(619,34))","class OGame2(object):
+ fleets_list = []
+ response = self.session.get('https://s{}-{}.ogame.gameforge.com/game/index.php?page=ingame&component=movement'
+ .format(self.server_number, self.server_language))
+ if response.status_code == 302:
+ fleets = response.text.split('
(24,20))","class FilteredListView(ListView):
+
+ filter_dict = {}
+
+ if not value in self.filter_keys:
+ raise ImproperlyConfigured(
+ ""%s is not present in filter_keys (%s)"" % (key, self.filter_keys)
+ )","class FilteredListView(ListView):
+
+ filter_dict = {}
+
+ if not key in self.filter_keys:
+ raise ImproperlyConfigured(
+ ""%s is not present in filter_keys (%s)"" % (key, self.filter_keys)
+ )"
+1464,https://:@github.com/pstch/django-crucrudile.git,399d14d8b52601ce12858af06a0e93f6bf2ade33,"@@ -337,7 +337,7 @@ class AutoPatternsMixin(object):
+ """"""View URL name (unprefixed, this is the name we give to url())""""""
+ return cls.get_url_name(view)
+
+- if view not in view.get_views():
++ if view not in cls.get_views():
+ raise ImproperlyConfigured(
+ ""Tried to get the URL patterns for a view (%s)""
+ "" that is not defined by get_views"" % view
+",django_crucrudile/models/mixins.py,"ReplaceText(target='cls' @(340,23)->(340,27))","class AutoPatternsMixin(object):
+ """"""View URL name (unprefixed, this is the name we give to url())""""""
+ return cls.get_url_name(view)
+
+ if view not in view.get_views():
+ raise ImproperlyConfigured(
+ ""Tried to get the URL patterns for a view (%s)""
+ "" that is not defined by get_views"" % view","class AutoPatternsMixin(object):
+ """"""View URL name (unprefixed, this is the name we give to url())""""""
+ return cls.get_url_name(view)
+
+ if view not in cls.get_views():
+ raise ImproperlyConfigured(
+ ""Tried to get the URL patterns for a view (%s)""
+ "" that is not defined by get_views"" % view"
+1465,https://:@github.com/pstch/django-crucrudile.git,fb0a3af53e4c57ea50164c28ecd872ae379e74b4,"@@ -119,7 +119,7 @@ def make_model_mixin(view_class,
+
+ setattr(ModelMixin,
+ 'get_%s_url_name' % view_class.get_underscored_action_name(),
+- _get_url)
++ _get_url_name)
+
+ if extra_funcs:
+ for func_name, func in extra_funcs.items():
+",django_crucrudile/models/mixins.py,"ReplaceText(target='_get_url_name' @(122,12)->(122,20))","def make_model_mixin(view_class,
+
+ setattr(ModelMixin,
+ 'get_%s_url_name' % view_class.get_underscored_action_name(),
+ _get_url)
+
+ if extra_funcs:
+ for func_name, func in extra_funcs.items():","def make_model_mixin(view_class,
+
+ setattr(ModelMixin,
+ 'get_%s_url_name' % view_class.get_underscored_action_name(),
+ _get_url_name)
+
+ if extra_funcs:
+ for func_name, func in extra_funcs.items():"
+1466,https://:@github.com/gawseed/threat-feed-tools.git,da1b21ecf69131800d1d782e169de3f1a8535572,"@@ -28,7 +28,7 @@ class FsdbThreatFeed():
+ for (count,entry) in enumerate(self._tfh):
+ array.append(entry)
+ dictionary[entry[index_column]] = entry # note, may erase older ones; build array?
+- if max_records and count >= max_records:
++ if max_records and count > max_records:
+ break
+
+ return (array, dictionary)
+",gawseed/threatfeed/feeds/fsdb.py,"ReplaceText(target='>' @(31,37)->(31,39))","class FsdbThreatFeed():
+ for (count,entry) in enumerate(self._tfh):
+ array.append(entry)
+ dictionary[entry[index_column]] = entry # note, may erase older ones; build array?
+ if max_records and count >= max_records:
+ break
+
+ return (array, dictionary)","class FsdbThreatFeed():
+ for (count,entry) in enumerate(self._tfh):
+ array.append(entry)
+ dictionary[entry[index_column]] = entry # note, may erase older ones; build array?
+ if max_records and count > max_records:
+ break
+
+ return (array, dictionary)"
+1467,https://:@github.com/gawseed/threat-feed-tools.git,354e753fde2635223ce189079a16b4b6a6ef8b36,"@@ -62,7 +62,7 @@ class KafkaDataSource(DataSource):
+ if self._end_time:
+ self.verbose(""searching forward from:"")
+ self.verbose(decoded_row)
+- count += 0
++ count = 0
+ while True:
+ count += 1
+ decoded_time = decoded_row[self._time_column]
+",gawseed/threatfeed/datasources/kafka.py,"ReplaceText(target='=' @(65,18)->(65,20))","class KafkaDataSource(DataSource):
+ if self._end_time:
+ self.verbose(""searching forward from:"")
+ self.verbose(decoded_row)
+ count += 0
+ while True:
+ count += 1
+ decoded_time = decoded_row[self._time_column]","class KafkaDataSource(DataSource):
+ if self._end_time:
+ self.verbose(""searching forward from:"")
+ self.verbose(decoded_row)
+ count = 0
+ while True:
+ count += 1
+ decoded_time = decoded_row[self._time_column]"
+1468,https://:@github.com/gawseed/threat-feed-tools.git,41e2731d9ccb0df59446cc0b0aa0f23ffe945a51,"@@ -51,4 +51,4 @@ class ConnectionCounter(Config):
+
+ results = {'connections': conns,
+ 'ports': ports}
+- return (self._output_key, conns)
++ return (self._output_key, results)
+",gawseed/threatfeed/enrichments/connectionCounter.py,"ReplaceText(target='results' @(54,34)->(54,39))","class ConnectionCounter(Config):
+
+ results = {'connections': conns,
+ 'ports': ports}
+ return (self._output_key, conns)","class ConnectionCounter(Config):
+
+ results = {'connections': conns,
+ 'ports': ports}
+ return (self._output_key, results)"
+1469,https://:@github.com/jlazear/pyoscope.git,8d5c3639de70f788c3cfcde695678031f6a8acb7,"@@ -409,7 +409,7 @@ class PyOscopeStatic(object):
+ elif isinstance(y, Iterable):
+ newy = y
+ yname = 'y_{j}'.format(j=j)
+- elif isinstance(x, NoneType):
++ elif isinstance(y, NoneType):
+ yname = None
+ temp = self.data.columns[0]
+ newy = range(len(self.data[temp]))
+",pyoscope.py,"ReplaceText(target='y' @(412,28)->(412,29))","class PyOscopeStatic(object):
+ elif isinstance(y, Iterable):
+ newy = y
+ yname = 'y_{j}'.format(j=j)
+ elif isinstance(x, NoneType):
+ yname = None
+ temp = self.data.columns[0]
+ newy = range(len(self.data[temp]))","class PyOscopeStatic(object):
+ elif isinstance(y, Iterable):
+ newy = y
+ yname = 'y_{j}'.format(j=j)
+ elif isinstance(y, NoneType):
+ yname = None
+ temp = self.data.columns[0]
+ newy = range(len(self.data[temp]))"
+1470,https://:@gitlab.com/LISTERINE/dj_arp_storm.git,06a3ee8610a39c0768a2ef98afdb930a1aa0c1cf,"@@ -87,7 +87,7 @@ def get_timeout(conf):
+ :rtype: int, float
+ """"""
+ timeout = conf.getint('general', 'timeout')
+- if timeout > 0:
++ if timeout < 0:
+ return float('inf')
+ return timeout
+
+",dj_arp_storm/dj_arp_storm.py,"ReplaceText(target='<' @(90,15)->(90,16))","def get_timeout(conf):
+ :rtype: int, float
+ """"""
+ timeout = conf.getint('general', 'timeout')
+ if timeout > 0:
+ return float('inf')
+ return timeout
+ ","def get_timeout(conf):
+ :rtype: int, float
+ """"""
+ timeout = conf.getint('general', 'timeout')
+ if timeout < 0:
+ return float('inf')
+ return timeout
+ "
+1471,https://:@github.com/mozilla/CANOSP-2019.git,cada35d7f44d921471da056f272f17c44705bb43,"@@ -100,7 +100,7 @@ def server_update(
+ # calculate the number of clients used in this round
+ m = max(int(client_num * C), 1)
+ # random set of m client's index
+- S = np.array(random.sample(range(client_num), client_num))
++ S = np.array(random.sample(range(client_num), m))
+
+ num_samples = []
+
+",simulation_util.py,"ReplaceText(target='m' @(103,54)->(103,64))","def server_update(
+ # calculate the number of clients used in this round
+ m = max(int(client_num * C), 1)
+ # random set of m client's index
+ S = np.array(random.sample(range(client_num), client_num))
+
+ num_samples = []
+ ","def server_update(
+ # calculate the number of clients used in this round
+ m = max(int(client_num * C), 1)
+ # random set of m client's index
+ S = np.array(random.sample(range(client_num), m))
+
+ num_samples = []
+ "
+1472,https://:@github.com/pattern-inc/cynetworkx.git,7ad6ebdb79672222fbd37571b9414d80a2eb31d1,"@@ -679,7 +679,7 @@ def eigenvector_centrality(G,max_iter=100,tol=1.0e-6,nstart=None):
+ for n in x: x[n]*=s
+ # check convergence
+ err=sum([abs(x[n]-xlast[n]) for n in x])
+- if err < n*tol:
++ if err < nnodes*tol:
+ return x
+
+ raise NetworkXError(""eigenvector_centrality(): power iteration failed to converge in %d iterations.""%(i+1))
+",networkx/algorithms/centrality.py,"ReplaceText(target='nnodes' @(682,17)->(682,18))","def eigenvector_centrality(G,max_iter=100,tol=1.0e-6,nstart=None):
+ for n in x: x[n]*=s
+ # check convergence
+ err=sum([abs(x[n]-xlast[n]) for n in x])
+ if err < n*tol:
+ return x
+
+ raise NetworkXError(""eigenvector_centrality(): power iteration failed to converge in %d iterations.""%(i+1))","def eigenvector_centrality(G,max_iter=100,tol=1.0e-6,nstart=None):
+ for n in x: x[n]*=s
+ # check convergence
+ err=sum([abs(x[n]-xlast[n]) for n in x])
+ if err < nnodes*tol:
+ return x
+
+ raise NetworkXError(""eigenvector_centrality(): power iteration failed to converge in %d iterations.""%(i+1))"
+1473,https://:@github.com/pattern-inc/cynetworkx.git,e9c5b23d0348c6587955208c0c806fd129ba4a1c,"@@ -49,7 +49,7 @@ def _initial_tree_solution(G, r, demand = 'demand', capacity = 'capacity',
+ maxWeight = 0
+ hugeWeight = 1 + n * maxWeight
+
+- labelGenerator = _gen_node_label(G)
++ labelGenerator = _gen_node_label(H)
+
+ for v, d in G.nodes(data = True)[1:]:
+ vDemand = d.get(demand, 0)
+",networkx/algorithms/flow/mincost.py,"ReplaceText(target='H' @(52,37)->(52,38))","def _initial_tree_solution(G, r, demand = 'demand', capacity = 'capacity',
+ maxWeight = 0
+ hugeWeight = 1 + n * maxWeight
+
+ labelGenerator = _gen_node_label(G)
+
+ for v, d in G.nodes(data = True)[1:]:
+ vDemand = d.get(demand, 0)","def _initial_tree_solution(G, r, demand = 'demand', capacity = 'capacity',
+ maxWeight = 0
+ hugeWeight = 1 + n * maxWeight
+
+ labelGenerator = _gen_node_label(H)
+
+ for v, d in G.nodes(data = True)[1:]:
+ vDemand = d.get(demand, 0)"
+1474,https://:@github.com/pattern-inc/cynetworkx.git,9a9b57ed411305c6f8c3a52d424014f17ed2ac5f,"@@ -85,7 +85,7 @@ def topological_sort(G,nbunch=None):
+
+ if nbunch is None:
+ nbunch = G.nodes_iter()
+- for v in G: # process all vertices in G
++ for v in nbunch: # process all vertices in G
+ if v in explored:
+ continue
+ fringe=[v] # nodes yet to look at
+",networkx/algorithms/dag.py,"ReplaceText(target='nbunch' @(88,13)->(88,14))","def topological_sort(G,nbunch=None):
+
+ if nbunch is None:
+ nbunch = G.nodes_iter()
+ for v in G: # process all vertices in G
+ if v in explored:
+ continue
+ fringe=[v] # nodes yet to look at","def topological_sort(G,nbunch=None):
+
+ if nbunch is None:
+ nbunch = G.nodes_iter()
+ for v in nbunch: # process all vertices in G
+ if v in explored:
+ continue
+ fringe=[v] # nodes yet to look at"
+1475,https://:@github.com/pattern-inc/cynetworkx.git,f22c0f25b393ad63c2a0273dea3bd095bcb4d63f,"@@ -67,7 +67,7 @@ def all_simple_paths(G, source, target, cutoff=None):
+ if source not in G:
+ raise nx.NetworkXError('source node %s not in graph'%source)
+ if target not in G:
+- raise nx.NetworkXError('target node %s not in graph'%source)
++ raise nx.NetworkXError('target node %s not in graph'%target)
+ if cutoff is None:
+ cutoff = len(G)-1
+ if G.is_multigraph():
+",networkx/algorithms/simple_paths.py,"ReplaceText(target='target' @(70,61)->(70,67))","def all_simple_paths(G, source, target, cutoff=None):
+ if source not in G:
+ raise nx.NetworkXError('source node %s not in graph'%source)
+ if target not in G:
+ raise nx.NetworkXError('target node %s not in graph'%source)
+ if cutoff is None:
+ cutoff = len(G)-1
+ if G.is_multigraph():","def all_simple_paths(G, source, target, cutoff=None):
+ if source not in G:
+ raise nx.NetworkXError('source node %s not in graph'%source)
+ if target not in G:
+ raise nx.NetworkXError('target node %s not in graph'%target)
+ if cutoff is None:
+ cutoff = len(G)-1
+ if G.is_multigraph():"
+1476,https://:@github.com/pattern-inc/cynetworkx.git,6ac082b2bdc9d91db7c5c9d84080787f7a98a953,"@@ -201,7 +201,7 @@ def simple_cycles(G):
+ if thisnode in closed:
+ _unblock(thisnode,blocked,B)
+ else:
+- for nbr in G[thisnode]:
++ for nbr in subG[thisnode]:
+ if thisnode not in B[nbr]:
+ B[nbr].add(thisnode)
+ stack.pop()
+",networkx/algorithms/cycles.py,"ReplaceText(target='subG' @(204,31)->(204,32))","def simple_cycles(G):
+ if thisnode in closed:
+ _unblock(thisnode,blocked,B)
+ else:
+ for nbr in G[thisnode]:
+ if thisnode not in B[nbr]:
+ B[nbr].add(thisnode)
+ stack.pop()","def simple_cycles(G):
+ if thisnode in closed:
+ _unblock(thisnode,blocked,B)
+ else:
+ for nbr in subG[thisnode]:
+ if thisnode not in B[nbr]:
+ B[nbr].add(thisnode)
+ stack.pop()"
+1477,https://:@github.com/pattern-inc/cynetworkx.git,31a656f9dd9ca015b4cdfc41c60e27995fb76f30,"@@ -89,7 +89,7 @@ def current_flow_closeness_centrality(G, normalized=True, weight='weight',
+ # this could be done without a copy if we really wanted to
+ H = nx.relabel_nodes(G, dict(zip(ordering, range(n))))
+ betweenness = dict.fromkeys(H, 0.0) # b[v]=0 for v in H
+- n = G.number_of_nodes()
++ n = H.number_of_nodes()
+ L = laplacian_sparse_matrix(H, nodelist=range(n), weight=weight,
+ dtype=dtype, format='csc')
+ C2 = solvername[solver](L, width=1, dtype=dtype) # initialize solver
+",networkx/algorithms/centrality/current_flow_closeness.py,"ReplaceText(target='H' @(92,8)->(92,9))","def current_flow_closeness_centrality(G, normalized=True, weight='weight',
+ # this could be done without a copy if we really wanted to
+ H = nx.relabel_nodes(G, dict(zip(ordering, range(n))))
+ betweenness = dict.fromkeys(H, 0.0) # b[v]=0 for v in H
+ n = G.number_of_nodes()
+ L = laplacian_sparse_matrix(H, nodelist=range(n), weight=weight,
+ dtype=dtype, format='csc')
+ C2 = solvername[solver](L, width=1, dtype=dtype) # initialize solver","def current_flow_closeness_centrality(G, normalized=True, weight='weight',
+ # this could be done without a copy if we really wanted to
+ H = nx.relabel_nodes(G, dict(zip(ordering, range(n))))
+ betweenness = dict.fromkeys(H, 0.0) # b[v]=0 for v in H
+ n = H.number_of_nodes()
+ L = laplacian_sparse_matrix(H, nodelist=range(n), weight=weight,
+ dtype=dtype, format='csc')
+ C2 = solvername[solver](L, width=1, dtype=dtype) # initialize solver"
+1478,https://:@github.com/pattern-inc/cynetworkx.git,1f1ee6761d04f572bc9afd892a6b43a77dad1150,"@@ -38,6 +38,6 @@ class TestDispersion(object):
+ disp = nx.dispersion(G)
+ for d in disp:
+ for dd in d:
+- assert d >= 0
++ assert dd >= 0
+
+
+",networkx/algorithms/centrality/tests/test_dispersion.py,"ReplaceText(target='dd' @(41,23)->(41,24))","class TestDispersion(object):
+ disp = nx.dispersion(G)
+ for d in disp:
+ for dd in d:
+ assert d >= 0
+
+ ","class TestDispersion(object):
+ disp = nx.dispersion(G)
+ for d in disp:
+ for dd in d:
+ assert dd >= 0
+
+ "
+1479,https://:@github.com/pattern-inc/cynetworkx.git,6f01f084cbf7fd71f3e2e670a2d25c0358d54cd1,"@@ -89,7 +89,7 @@ def shortest_augmenting_path_impl(G, s, t, capacity, two_phase):
+ path = [s]
+ u = s
+ d = n if not two_phase else int(min(m ** 0.5, 2 * n ** (2. / 3)))
+- done = R.node[s]['height'] < d
++ done = R.node[s]['height'] >= d
+ while not done:
+ height = R.node[u]['height']
+ curr_edge = R.node[u]['curr_edge']
+",networkx/algorithms/flow/shortest_augmenting_path.py,"ReplaceText(target='>=' @(92,31)->(92,32))","def shortest_augmenting_path_impl(G, s, t, capacity, two_phase):
+ path = [s]
+ u = s
+ d = n if not two_phase else int(min(m ** 0.5, 2 * n ** (2. / 3)))
+ done = R.node[s]['height'] < d
+ while not done:
+ height = R.node[u]['height']
+ curr_edge = R.node[u]['curr_edge']","def shortest_augmenting_path_impl(G, s, t, capacity, two_phase):
+ path = [s]
+ u = s
+ d = n if not two_phase else int(min(m ** 0.5, 2 * n ** (2. / 3)))
+ done = R.node[s]['height'] >= d
+ while not done:
+ height = R.node[u]['height']
+ curr_edge = R.node[u]['curr_edge']"
+1480,https://:@github.com/pattern-inc/cynetworkx.git,6b2dbffd2132b4d7034f59d8a9b089f8c9ca848f,"@@ -158,5 +158,5 @@ def adjacency_graph(data, directed=False, multigraph=True, attrs=_attrs):
+ else:
+ ky = target_data.pop(key, None)
+ graph.add_edge(source, target, key=ky)
+- graph[source][target][ky].update(target_data)
++ graph[source][target][ky].update(tdata)
+ return graph
+",networkx/readwrite/json_graph/adjacency.py,"ReplaceText(target='tdata' @(161,49)->(161,60))","def adjacency_graph(data, directed=False, multigraph=True, attrs=_attrs):
+ else:
+ ky = target_data.pop(key, None)
+ graph.add_edge(source, target, key=ky)
+ graph[source][target][ky].update(target_data)
+ return graph","def adjacency_graph(data, directed=False, multigraph=True, attrs=_attrs):
+ else:
+ ky = target_data.pop(key, None)
+ graph.add_edge(source, target, key=ky)
+ graph[source][target][ky].update(tdata)
+ return graph"
+1481,https://:@github.com/pattern-inc/cynetworkx.git,5864982dd97baf21aac4e743de5fbbb103860017,"@@ -48,7 +48,7 @@ def cytoscape_data(G, attrs=None):
+ n = {""data"" : j.copy()}
+ n[""data""][""id""] = str(i)
+ n[""data""][""value""] = i
+- n[""data""][""name""] = n.get(name) or str(i)
++ n[""data""][""name""] = j.get(name) or str(i)
+ nodes.append(n)
+
+ for e in G.edges():
+",networkx/readwrite/json_graph/cytoscape.py,"ReplaceText(target='j' @(51,28)->(51,29))","def cytoscape_data(G, attrs=None):
+ n = {""data"" : j.copy()}
+ n[""data""][""id""] = str(i)
+ n[""data""][""value""] = i
+ n[""data""][""name""] = n.get(name) or str(i)
+ nodes.append(n)
+
+ for e in G.edges():","def cytoscape_data(G, attrs=None):
+ n = {""data"" : j.copy()}
+ n[""data""][""id""] = str(i)
+ n[""data""][""value""] = i
+ n[""data""][""name""] = j.get(name) or str(i)
+ nodes.append(n)
+
+ for e in G.edges():"
+1482,https://:@github.com/pattern-inc/cynetworkx.git,fbc901aa2d30c8dfbe145af747097e92d9b5e5c9,"@@ -594,5 +594,5 @@ def _add_nodes_with_bipartite_label(G, lena, lenb):
+ G.add_nodes_from(range(0,lena+lenb))
+ b=dict(zip(range(0,lena),[0]*lena))
+ b.update(dict(zip(range(lena,lena+lenb),[1]*lenb)))
+- nx.set_node_attributes(G,'bipartite',b)
++ nx.set_node_attributes(G, b, 'bipartite')
+ return G
+",networkx/algorithms/bipartite/generators.py,"ArgSwap(idxs=1<->2 @(597,4)->(597,26))","def _add_nodes_with_bipartite_label(G, lena, lenb):
+ G.add_nodes_from(range(0,lena+lenb))
+ b=dict(zip(range(0,lena),[0]*lena))
+ b.update(dict(zip(range(lena,lena+lenb),[1]*lenb)))
+ nx.set_node_attributes(G,'bipartite',b)
+ return G","def _add_nodes_with_bipartite_label(G, lena, lenb):
+ G.add_nodes_from(range(0,lena+lenb))
+ b=dict(zip(range(0,lena),[0]*lena))
+ b.update(dict(zip(range(lena,lena+lenb),[1]*lenb)))
+ nx.set_node_attributes(G, b, 'bipartite')
+ return G"
+1483,https://:@github.com/pattern-inc/cynetworkx.git,fbc901aa2d30c8dfbe145af747097e92d9b5e5c9,"@@ -440,7 +440,7 @@ def condensation(G, scc=None):
+ C.add_edges_from((mapping[u], mapping[v]) for u, v in G.edges()
+ if mapping[u] != mapping[v])
+ # Add a list of members (ie original nodes) to each node (ie scc) in C.
+- nx.set_node_attributes(C, 'members', members)
++ nx.set_node_attributes(C, members, 'members')
+ # Add mapping dict as graph attribute
+ C.graph['mapping'] = mapping
+ return C
+",networkx/algorithms/components/strongly_connected.py,"ArgSwap(idxs=1<->2 @(443,4)->(443,26))","def condensation(G, scc=None):
+ C.add_edges_from((mapping[u], mapping[v]) for u, v in G.edges()
+ if mapping[u] != mapping[v])
+ # Add a list of members (ie original nodes) to each node (ie scc) in C.
+ nx.set_node_attributes(C, 'members', members)
+ # Add mapping dict as graph attribute
+ C.graph['mapping'] = mapping
+ return C","def condensation(G, scc=None):
+ C.add_edges_from((mapping[u], mapping[v]) for u, v in G.edges()
+ if mapping[u] != mapping[v])
+ # Add a list of members (ie original nodes) to each node (ie scc) in C.
+ nx.set_node_attributes(C, members, 'members')
+ # Add mapping dict as graph attribute
+ C.graph['mapping'] = mapping
+ return C"
+1484,https://:@github.com/pattern-inc/cynetworkx.git,fbc901aa2d30c8dfbe145af747097e92d9b5e5c9,"@@ -502,8 +502,8 @@ class TestCutoff:
+
+ def test_complete_graph_cutoff(self):
+ G = nx.complete_graph(5)
+- nx.set_edge_attributes(G, 'capacity',
+- dict(((u, v), 1) for u, v in G.edges()))
++ nx.set_edge_attributes(G, dict(((u, v), 1) for u, v in G.edges()),
++ 'capacity')
+ for flow_func in [shortest_augmenting_path, edmonds_karp]:
+ for cutoff in [3, 2, 1]:
+ result = nx.maximum_flow_value(G, 0, 4, flow_func=flow_func,
+",networkx/algorithms/flow/tests/test_maxflow.py,"ArgSwap(idxs=1<->2 @(505,8)->(505,30))","class TestCutoff:
+
+ def test_complete_graph_cutoff(self):
+ G = nx.complete_graph(5)
+ nx.set_edge_attributes(G, 'capacity',
+ dict(((u, v), 1) for u, v in G.edges()))
+ for flow_func in [shortest_augmenting_path, edmonds_karp]:
+ for cutoff in [3, 2, 1]:
+ result = nx.maximum_flow_value(G, 0, 4, flow_func=flow_func,","class TestCutoff:
+
+ def test_complete_graph_cutoff(self):
+ G = nx.complete_graph(5)
+ nx.set_edge_attributes(G, dict(((u, v), 1) for u, v in G.edges()),
+ 'capacity')
+ for flow_func in [shortest_augmenting_path, edmonds_karp]:
+ for cutoff in [3, 2, 1]:
+ result = nx.maximum_flow_value(G, 0, 4, flow_func=flow_func,"
+1485,https://:@github.com/pattern-inc/cynetworkx.git,fbc901aa2d30c8dfbe145af747097e92d9b5e5c9,"@@ -85,7 +85,7 @@ class TestMaxflowLargeGraph:
+ def test_complete_graph(self):
+ N = 50
+ G = nx.complete_graph(N)
+- nx.set_edge_attributes(G, 'capacity', 5)
++ nx.set_edge_attributes(G, 5, 'capacity')
+ R = build_residual_network(G, 'capacity')
+ kwargs = dict(residual=R)
+
+",networkx/algorithms/flow/tests/test_maxflow_large_graph.py,"ArgSwap(idxs=1<->2 @(88,8)->(88,30))","class TestMaxflowLargeGraph:
+ def test_complete_graph(self):
+ N = 50
+ G = nx.complete_graph(N)
+ nx.set_edge_attributes(G, 'capacity', 5)
+ R = build_residual_network(G, 'capacity')
+ kwargs = dict(residual=R)
+ ","class TestMaxflowLargeGraph:
+ def test_complete_graph(self):
+ N = 50
+ G = nx.complete_graph(N)
+ nx.set_edge_attributes(G, 5, 'capacity')
+ R = build_residual_network(G, 'capacity')
+ kwargs = dict(residual=R)
+ "
+1486,https://:@github.com/kundajelab/keras-genomics.git,6b6c1a9d123f91193e5311ccd22d169a6c9d0733,"@@ -4,5 +4,5 @@ from keras import backend as K
+
+ def ambig_binary_crossentropy(y_true,y_pred):
+ non_ambig = K.cast((y_true > -0.5),'float32')
+- return K.mean(K.binary_crossentropy(y_pred, y_true)
++ return K.mean(K.binary_crossentropy(y_true, y_pred)
+ *non_ambig, axis=-1)
+",keras_genomics/losses.py,"ArgSwap(idxs=0<->1 @(7,22)->(7,43))","from keras import backend as K
+
+ def ambig_binary_crossentropy(y_true,y_pred):
+ non_ambig = K.cast((y_true > -0.5),'float32')
+ return K.mean(K.binary_crossentropy(y_pred, y_true)
+ *non_ambig, axis=-1)","from keras import backend as K
+
+ def ambig_binary_crossentropy(y_true,y_pred):
+ non_ambig = K.cast((y_true > -0.5),'float32')
+ return K.mean(K.binary_crossentropy(y_true, y_pred)
+ *non_ambig, axis=-1)"
+1487,https://:@github.com/Nekmo/nekumo-cloud.git,f111818974631fad02fa0146f04638783b3da8df,"@@ -41,7 +41,7 @@ class NekumoManagement(object):
+ args = self.parser.parse_args(argv[1:])
+ self.nekumo.gateways = list(self.parse_gateways(args))
+ self.nekumo.ifaces = list(self.parse_ifaces(args))
+- if 'NEKUMO_DEBUG_IFACE' in os.environ:
++ if 'NEKUMO_DEBUG_IFACE' not in os.environ:
+ loop = asyncio.get_event_loop()
+ loop.run_forever()
+
+",nekumo/core/management.py,"ReplaceText(target=' not in ' @(44,31)->(44,35))","class NekumoManagement(object):
+ args = self.parser.parse_args(argv[1:])
+ self.nekumo.gateways = list(self.parse_gateways(args))
+ self.nekumo.ifaces = list(self.parse_ifaces(args))
+ if 'NEKUMO_DEBUG_IFACE' in os.environ:
+ loop = asyncio.get_event_loop()
+ loop.run_forever()
+ ","class NekumoManagement(object):
+ args = self.parser.parse_args(argv[1:])
+ self.nekumo.gateways = list(self.parse_gateways(args))
+ self.nekumo.ifaces = list(self.parse_ifaces(args))
+ if 'NEKUMO_DEBUG_IFACE' not in os.environ:
+ loop = asyncio.get_event_loop()
+ loop.run_forever()
+ "
+1488,https://:@github.com/stonebig/baresql.git,edeb2171759dc758dfa557404982c34e2fe385f2,"@@ -225,7 +225,7 @@ class baresql(object):
+ level = 0
+ status=""normal""
+ self.cte_dico = {}
+- elif token == ""TK_OTHER"" and not cte_inline:
++ elif token == ""TK_OTHER"" and cte_inline:
+ if tk_value.lower() == ""from"":
+ from_lvl[level] = True
+ elif from_lvl[level]:
+",baresql/baresql.py,"ReplaceText(target='' @(228,41)->(228,45))","class baresql(object):
+ level = 0
+ status=""normal""
+ self.cte_dico = {}
+ elif token == ""TK_OTHER"" and not cte_inline:
+ if tk_value.lower() == ""from"":
+ from_lvl[level] = True
+ elif from_lvl[level]:","class baresql(object):
+ level = 0
+ status=""normal""
+ self.cte_dico = {}
+ elif token == ""TK_OTHER"" and cte_inline:
+ if tk_value.lower() == ""from"":
+ from_lvl[level] = True
+ elif from_lvl[level]:"
+1489,https://:@github.com/stonebig/baresql.git,12ac74b6d6f75f723938608ef1b3202e81f8d7d5,"@@ -437,7 +437,7 @@ class baresql(object):
+
+ for table_ref in tables:
+ table_sql = table_ref+""$$""
+- df = env[table_ref]
++ df = names_env[table_ref]
+ df = self._ensure_data_frame(df, table_ref)
+ #destroy previous Python temp table before importing the new one
+ pre_q = ""DROP TABLE IF EXISTS %s"" % table_sql
+",baresql/baresql.py,"ReplaceText(target='names_env' @(440,17)->(440,20))","class baresql(object):
+
+ for table_ref in tables:
+ table_sql = table_ref+""$$""
+ df = env[table_ref]
+ df = self._ensure_data_frame(df, table_ref)
+ #destroy previous Python temp table before importing the new one
+ pre_q = ""DROP TABLE IF EXISTS %s"" % table_sql","class baresql(object):
+
+ for table_ref in tables:
+ table_sql = table_ref+""$$""
+ df = names_env[table_ref]
+ df = self._ensure_data_frame(df, table_ref)
+ #destroy previous Python temp table before importing the new one
+ pre_q = ""DROP TABLE IF EXISTS %s"" % table_sql"
+1490,https://:@github.com/takluyver/astsearch.git,68b9fe6322acccd76ff8353726e5cb9010064d9b,"@@ -31,7 +31,7 @@ class ASTPatternFinder(object):
+ with open(file, 'rb') as f:
+ tree = ast.parse(f.read())
+ else:
+- tree = ast.parse(f.read())
++ tree = ast.parse(file.read())
+ yield from self.scan_ast(tree)
+
+ def filter_subdirs(self, dirnames):
+",astsearch.py,"ReplaceText(target='file' @(34,29)->(34,30))","class ASTPatternFinder(object):
+ with open(file, 'rb') as f:
+ tree = ast.parse(f.read())
+ else:
+ tree = ast.parse(f.read())
+ yield from self.scan_ast(tree)
+
+ def filter_subdirs(self, dirnames):","class ASTPatternFinder(object):
+ with open(file, 'rb') as f:
+ tree = ast.parse(f.read())
+ else:
+ tree = ast.parse(file.read())
+ yield from self.scan_ast(tree)
+
+ def filter_subdirs(self, dirnames):"
+1491,https://:@github.com/rsanchezgarc/micrograph_cleaner_em.git,df470ae67588e8a1c7ba04ce14b517552e0ad788,"@@ -41,7 +41,7 @@ def cleanOneMic(micFname, boxSize, deepLearningModel=DEFAULT_MODEL_PATH, inputCo
+ global MASK_PREDICTOR_HANDLER
+ with LOCK:
+ if MASK_PREDICTOR_HANDLER is None:
+- MASK_PREDICTOR_HANDLER= MaskPredictor(deepLearningModel, boxSize, gpus)
++ MASK_PREDICTOR_HANDLER= MaskPredictor(boxSize, deepLearningModel, gpus)
+
+
+ maskPredictor= MASK_PREDICTOR_HANDLER
+",micrograph_cleaner_em/cleanOneMic.py,"ArgSwap(idxs=0<->1 @(44,30)->(44,43))","def cleanOneMic(micFname, boxSize, deepLearningModel=DEFAULT_MODEL_PATH, inputCo
+ global MASK_PREDICTOR_HANDLER
+ with LOCK:
+ if MASK_PREDICTOR_HANDLER is None:
+ MASK_PREDICTOR_HANDLER= MaskPredictor(deepLearningModel, boxSize, gpus)
+
+
+ maskPredictor= MASK_PREDICTOR_HANDLER","def cleanOneMic(micFname, boxSize, deepLearningModel=DEFAULT_MODEL_PATH, inputCo
+ global MASK_PREDICTOR_HANDLER
+ with LOCK:
+ if MASK_PREDICTOR_HANDLER is None:
+ MASK_PREDICTOR_HANDLER= MaskPredictor(boxSize, deepLearningModel, gpus)
+
+
+ maskPredictor= MASK_PREDICTOR_HANDLER"
+1492,https://:@github.com/rsanchezgarc/micrograph_cleaner_em.git,df470ae67588e8a1c7ba04ce14b517552e0ad788,"@@ -19,7 +19,7 @@ class TestMaskPredictor(TestCase):
+
+ with mrcfile.open(micFname, permissive=True) as f: mic = f.data.copy()
+
+- with MaskPredictor(deepLearningModelFname, boxSize, gpus=[0]) as mp:
++ with MaskPredictor(boxSize, deepLearningModelFname, gpus=[0]) as mp:
+ mask = mp.predictMask(mic)
+
+ self.assertTrue(mask.shape==mic.shape, ""Error, mask shape is not the same that mic shape"")
+",micrograph_cleaner_em/tests/test_maskPredictor.py,"ArgSwap(idxs=0<->1 @(22,9)->(22,22))","class TestMaskPredictor(TestCase):
+
+ with mrcfile.open(micFname, permissive=True) as f: mic = f.data.copy()
+
+ with MaskPredictor(deepLearningModelFname, boxSize, gpus=[0]) as mp:
+ mask = mp.predictMask(mic)
+
+ self.assertTrue(mask.shape==mic.shape, ""Error, mask shape is not the same that mic shape"")","class TestMaskPredictor(TestCase):
+
+ with mrcfile.open(micFname, permissive=True) as f: mic = f.data.copy()
+
+ with MaskPredictor(boxSize, deepLearningModelFname, gpus=[0]) as mp:
+ mask = mp.predictMask(mic)
+
+ self.assertTrue(mask.shape==mic.shape, ""Error, mask shape is not the same that mic shape"")"
+1493,https://:@github.com/maebert/snoo.git,d2d822c48b4acc5046b4ca28a63153a0d0576615,"@@ -116,7 +116,7 @@ class Client:
+ arrow.get(self.session[""last_updated""]).shift(
+ seconds=int(self.config[""update_interval""])
+ )
+- < arrow.utcnow()
++ > arrow.utcnow()
+ ):
+ return self.session
+
+",snoo/client.py,"ReplaceText(target='>' @(119,16)->(119,17))","class Client:
+ arrow.get(self.session[""last_updated""]).shift(
+ seconds=int(self.config[""update_interval""])
+ )
+ < arrow.utcnow()
+ ):
+ return self.session
+ ","class Client:
+ arrow.get(self.session[""last_updated""]).shift(
+ seconds=int(self.config[""update_interval""])
+ )
+ > arrow.utcnow()
+ ):
+ return self.session
+ "
+1494,https://:@github.com/maebert/snoo.git,4f8657a2132e8c1dfa84b1a49fb043610b70c934,"@@ -234,7 +234,7 @@ class Client:
+ method=""get"",
+ params={""startTime"": day.format(""MM/DD/YYYY hh:mm:ss"")},
+ )
+- result.append(Day._from_data(start_time, data))
++ result.append(Day._from_data(day, data))
+ return result
+
+ def export_sessions(self, start_time, end_time):
+",snoo/client.py,"ReplaceText(target='day' @(237,41)->(237,51))","class Client:
+ method=""get"",
+ params={""startTime"": day.format(""MM/DD/YYYY hh:mm:ss"")},
+ )
+ result.append(Day._from_data(start_time, data))
+ return result
+
+ def export_sessions(self, start_time, end_time):","class Client:
+ method=""get"",
+ params={""startTime"": day.format(""MM/DD/YYYY hh:mm:ss"")},
+ )
+ result.append(Day._from_data(day, data))
+ return result
+
+ def export_sessions(self, start_time, end_time):"
+1495,https://:@github.com/Microsoft/Recommenders.git,57d99ce3be798dd2d48a169fbeaaec76a6d9637e,"@@ -58,7 +58,7 @@ def _merge_rating_true_pred(
+
+ # Select the columns needed for evaluations
+ rating_true = rating_true[[col_user, col_item, col_rating]]
+- rating_pred = rating_true[[col_user, col_item, col_prediction]]
++ rating_pred = rating_pred[[col_user, col_item, col_prediction]]
+
+ if col_rating == col_prediction:
+ rating_true_pred = pd.merge(
+",reco_utils/evaluation/python_evaluation.py,"ReplaceText(target='rating_pred' @(61,18)->(61,29))","def _merge_rating_true_pred(
+
+ # Select the columns needed for evaluations
+ rating_true = rating_true[[col_user, col_item, col_rating]]
+ rating_pred = rating_true[[col_user, col_item, col_prediction]]
+
+ if col_rating == col_prediction:
+ rating_true_pred = pd.merge(","def _merge_rating_true_pred(
+
+ # Select the columns needed for evaluations
+ rating_true = rating_true[[col_user, col_item, col_rating]]
+ rating_pred = rating_pred[[col_user, col_item, col_prediction]]
+
+ if col_rating == col_prediction:
+ rating_true_pred = pd.merge("
+1496,https://:@github.com/Microsoft/Recommenders.git,367ca689d059d7569beb7b3cf153720fed323e30,"@@ -160,7 +160,7 @@ def split_pandas_data_with_ratios(data, ratios, seed=1234, resample=False):
+ splits = np.split(data, [round(x * len(data)) for x in split_index])
+
+ # Add split index (this makes splitting by group more efficient).
+- for i in range(len(split_index)):
++ for i in range(len(ratios)):
+ splits[i]['split_index'] = i
+
+ return splits
+",reco_utils/dataset/split_utils.py,"ReplaceText(target='ratios' @(163,23)->(163,34))","def split_pandas_data_with_ratios(data, ratios, seed=1234, resample=False):
+ splits = np.split(data, [round(x * len(data)) for x in split_index])
+
+ # Add split index (this makes splitting by group more efficient).
+ for i in range(len(split_index)):
+ splits[i]['split_index'] = i
+
+ return splits","def split_pandas_data_with_ratios(data, ratios, seed=1234, resample=False):
+ splits = np.split(data, [round(x * len(data)) for x in split_index])
+
+ # Add split index (this makes splitting by group more efficient).
+ for i in range(len(ratios)):
+ splits[i]['split_index'] = i
+
+ return splits"
+1497,https://:@github.com/jkreklow/radproc.git,b319770b94b707a4cdaa335911e857a311f3f92c,"@@ -374,7 +374,7 @@ def export_dfrows_to_gdb(dataDF, idRaster, outGDBPath, GDBName, statistics=""""):
+ outRaster = ""R_%i"" % (index.year)
+ elif dataDF.index.is_month_end.all() == True or dataDF.index.is_month_start.all() == True:
+ outRaster = ""R_%i%02i"" % (index.year, index.month)
+- elif dataDF.index.hour.all() == 0:
++ elif dataDF.index.hour.all() != 0:
+ outRaster = ""R_%i%02i%02i"" % (index.year, index.month, index.day)
+ else:
+ outRaster = ""R_%i%02i%02i_%02i%02i"" % (index.year, index.month, index.day, index.hour, index.minute)
+",build/lib/radproc/arcgis.py,"ReplaceText(target='!=' @(377,41)->(377,43))","def export_dfrows_to_gdb(dataDF, idRaster, outGDBPath, GDBName, statistics=""""):
+ outRaster = ""R_%i"" % (index.year)
+ elif dataDF.index.is_month_end.all() == True or dataDF.index.is_month_start.all() == True:
+ outRaster = ""R_%i%02i"" % (index.year, index.month)
+ elif dataDF.index.hour.all() == 0:
+ outRaster = ""R_%i%02i%02i"" % (index.year, index.month, index.day)
+ else:
+ outRaster = ""R_%i%02i%02i_%02i%02i"" % (index.year, index.month, index.day, index.hour, index.minute)","def export_dfrows_to_gdb(dataDF, idRaster, outGDBPath, GDBName, statistics=""""):
+ outRaster = ""R_%i"" % (index.year)
+ elif dataDF.index.is_month_end.all() == True or dataDF.index.is_month_start.all() == True:
+ outRaster = ""R_%i%02i"" % (index.year, index.month)
+ elif dataDF.index.hour.all() != 0:
+ outRaster = ""R_%i%02i%02i"" % (index.year, index.month, index.day)
+ else:
+ outRaster = ""R_%i%02i%02i_%02i%02i"" % (index.year, index.month, index.day, index.hour, index.minute)"
+1498,https://:@github.com/graham/python_xid.git,232f0ae87a6feee945a1b9e09bf99eefbf30c7a5,"@@ -146,7 +146,7 @@ class Xid(object):
+ def from_string(cls, s):
+ # type: (str) -> Xid
+ val = base32hex.b32decode(s.upper())
+- value_check = [0 < x < 255 for x in val]
++ value_check = [0 <= x < 255 for x in val]
+
+ if not all(value_check):
+ raise InvalidXid(s)
+",xid.py,"ReplaceText(target='<=' @(149,25)->(149,26))","class Xid(object):
+ def from_string(cls, s):
+ # type: (str) -> Xid
+ val = base32hex.b32decode(s.upper())
+ value_check = [0 < x < 255 for x in val]
+
+ if not all(value_check):
+ raise InvalidXid(s)","class Xid(object):
+ def from_string(cls, s):
+ # type: (str) -> Xid
+ val = base32hex.b32decode(s.upper())
+ value_check = [0 <= x < 255 for x in val]
+
+ if not all(value_check):
+ raise InvalidXid(s)"
+1499,https://:@github.com/tboser/cwltool.git,5d633799f2eae4a5e0fedcae72381213ae9aba30,"@@ -117,7 +117,7 @@ class Builder(object):
+ if ""secondaryFiles"" in binding:
+ if ""secondaryFiles"" not in datum:
+ datum[""secondaryFiles""] = []
+- for sf in aslist(schema[""secondaryFiles""]):
++ for sf in aslist(binding[""secondaryFiles""]):
+ if isinstance(sf, dict):
+ sfpath = expression.do_eval(sf, self.job, self.requirements, self.docpath, datum[""path""])
+ else:
+",reference/cwltool/draft2tool.py,"ReplaceText(target='binding' @(120,41)->(120,47))","class Builder(object):
+ if ""secondaryFiles"" in binding:
+ if ""secondaryFiles"" not in datum:
+ datum[""secondaryFiles""] = []
+ for sf in aslist(schema[""secondaryFiles""]):
+ if isinstance(sf, dict):
+ sfpath = expression.do_eval(sf, self.job, self.requirements, self.docpath, datum[""path""])
+ else:","class Builder(object):
+ if ""secondaryFiles"" in binding:
+ if ""secondaryFiles"" not in datum:
+ datum[""secondaryFiles""] = []
+ for sf in aslist(binding[""secondaryFiles""]):
+ if isinstance(sf, dict):
+ sfpath = expression.do_eval(sf, self.job, self.requirements, self.docpath, datum[""path""])
+ else:"
+1500,https://:@github.com/tboser/cwltool.git,c22c762ba871bbe9ab4f6be7f639ad69a7b78942,"@@ -40,7 +40,7 @@ def _draft2toDraft3dev1(doc, loader, baseuri): # type: (Any, Loader, str) -> An
+ impLoaded = loader.fetch(imp)
+ r = None # type: Dict[str, Any]
+ if isinstance(impLoaded, list):
+- r = {""@graph"": r}
++ r = {""@graph"": impLoaded}
+ elif isinstance(impLoaded, dict):
+ r = impLoaded
+ else:
+",cwltool/update.py,"ReplaceText(target='impLoaded' @(43,35)->(43,36))","def _draft2toDraft3dev1(doc, loader, baseuri): # type: (Any, Loader, str) -> An
+ impLoaded = loader.fetch(imp)
+ r = None # type: Dict[str, Any]
+ if isinstance(impLoaded, list):
+ r = {""@graph"": r}
+ elif isinstance(impLoaded, dict):
+ r = impLoaded
+ else:","def _draft2toDraft3dev1(doc, loader, baseuri): # type: (Any, Loader, str) -> An
+ impLoaded = loader.fetch(imp)
+ r = None # type: Dict[str, Any]
+ if isinstance(impLoaded, list):
+ r = {""@graph"": impLoaded}
+ elif isinstance(impLoaded, dict):
+ r = impLoaded
+ else:"
+1501,https://:@github.com/tboser/cwltool.git,ad34521788edfe8b9c98841b16846c5eebb07edc,"@@ -337,7 +337,7 @@ class Loader(object):
+ for k in sorted(idmapFieldValue.keys()):
+ val = idmapFieldValue[k]
+ v = None # type: Dict[unicode, Any]
+- if not isinstance(v, dict):
++ if not isinstance(val, dict):
+ if idmapField in loader.mapPredicate:
+ v = {loader.mapPredicate[idmapField]: val}
+ else:
+",schema_salad/ref_resolver.py,"ReplaceText(target='val' @(340,42)->(340,43))","class Loader(object):
+ for k in sorted(idmapFieldValue.keys()):
+ val = idmapFieldValue[k]
+ v = None # type: Dict[unicode, Any]
+ if not isinstance(v, dict):
+ if idmapField in loader.mapPredicate:
+ v = {loader.mapPredicate[idmapField]: val}
+ else:","class Loader(object):
+ for k in sorted(idmapFieldValue.keys()):
+ val = idmapFieldValue[k]
+ v = None # type: Dict[unicode, Any]
+ if not isinstance(val, dict):
+ if idmapField in loader.mapPredicate:
+ v = {loader.mapPredicate[idmapField]: val}
+ else:"
+1502,https://:@github.com/MichaelScript/zerorpc-python.git,74899a7f9f7ebe06e08ce486d3e55145131e399e,"@@ -241,7 +241,7 @@ class ClientBase(object):
+ return self._process_response(request_event, bufchan, timeout)
+
+ async_result = gevent.event.AsyncResult()
+- gevent.spawn(self._process_response, method, bufchan,
++ gevent.spawn(self._process_response, request_event, bufchan,
+ timeout).link(async_result)
+ return async_result
+ except:
+",zerorpc/core.py,"ReplaceText(target='request_event' @(244,49)->(244,55))","class ClientBase(object):
+ return self._process_response(request_event, bufchan, timeout)
+
+ async_result = gevent.event.AsyncResult()
+ gevent.spawn(self._process_response, method, bufchan,
+ timeout).link(async_result)
+ return async_result
+ except:","class ClientBase(object):
+ return self._process_response(request_event, bufchan, timeout)
+
+ async_result = gevent.event.AsyncResult()
+ gevent.spawn(self._process_response, request_event, bufchan,
+ timeout).link(async_result)
+ return async_result
+ except:"
+1503,https://:@github.com/CellProfiling/cam_acq.git,ff589fdfb73715b09fe27ffd8a2040ae286eca4c,"@@ -191,7 +191,7 @@ class CamImage(Base):
+ """"""Return the part of the name of the image, matching regex.""""""
+ if path is None:
+ path = self.path
+- return super(CamImage, self).get_name(path, regex)
++ return super(CamImage, self).get_name(regex, path)
+
+ def make_proj(self, path_list):
+ """"""Make a dict of max projections from a list of image paths.
+",camacq/image.py,"ArgSwap(idxs=0<->1 @(194,15)->(194,45))","class CamImage(Base):
+ """"""Return the part of the name of the image, matching regex.""""""
+ if path is None:
+ path = self.path
+ return super(CamImage, self).get_name(path, regex)
+
+ def make_proj(self, path_list):
+ """"""Make a dict of max projections from a list of image paths.","class CamImage(Base):
+ """"""Return the part of the name of the image, matching regex.""""""
+ if path is None:
+ path = self.path
+ return super(CamImage, self).get_name(regex, path)
+
+ def make_proj(self, path_list):
+ """"""Make a dict of max projections from a list of image paths."
+1504,https://:@github.com/mvrozanti/youtube-curses.git,f4d58ba3be350a25dd70c607be565ac8a21ad1ff,"@@ -107,7 +107,7 @@ try:
+ stdscr.addstr(1,0,""too small"")
+ key = stdscr.getch()
+ if key == curses.KEY_DOWN:
+- if highlight + page * maxitems + 1 != totalitems:
++ if highlight + page * maxitems + 1 < totalitems:
+ if highlight + 1 == maxitems:
+ page += 1
+ highlight = 0
+",twitch-curses.py,"ReplaceText(target='<' @(110,38)->(110,40))","try:
+ stdscr.addstr(1,0,""too small"")
+ key = stdscr.getch()
+ if key == curses.KEY_DOWN:
+ if highlight + page * maxitems + 1 != totalitems:
+ if highlight + 1 == maxitems:
+ page += 1
+ highlight = 0","try:
+ stdscr.addstr(1,0,""too small"")
+ key = stdscr.getch()
+ if key == curses.KEY_DOWN:
+ if highlight + page * maxitems + 1 < totalitems:
+ if highlight + 1 == maxitems:
+ page += 1
+ highlight = 0"
+1505,https://:@github.com/seblin/shcol.git,96a07be4ba75dcd00374dbf0bf69aabf55bedf36,"@@ -51,7 +51,7 @@ class ColumnWidthCalculator(object):
+ item_widths = [len(item) for item in items]
+ if not item_widths:
+ column_widths, num_lines = [], 0
+- elif any(width > self.max_line_width for width in item_widths):
++ elif any(width >= self.max_line_width for width in item_widths):
+ column_widths, num_lines = [self.max_line_width], len(item_widths)
+ else:
+ column_widths, num_lines = self.calculate_columns(item_widths)
+",shcol.py,"ReplaceText(target='>=' @(54,23)->(54,24))","class ColumnWidthCalculator(object):
+ item_widths = [len(item) for item in items]
+ if not item_widths:
+ column_widths, num_lines = [], 0
+ elif any(width > self.max_line_width for width in item_widths):
+ column_widths, num_lines = [self.max_line_width], len(item_widths)
+ else:
+ column_widths, num_lines = self.calculate_columns(item_widths)","class ColumnWidthCalculator(object):
+ item_widths = [len(item) for item in items]
+ if not item_widths:
+ column_widths, num_lines = [], 0
+ elif any(width >= self.max_line_width for width in item_widths):
+ column_widths, num_lines = [self.max_line_width], len(item_widths)
+ else:
+ column_widths, num_lines = self.calculate_columns(item_widths)"
+1506,https://:@github.com/biothings/biothings_explorer.git,aaf17dd35289147c1eb701f6739e576a16a08ca1,"@@ -41,7 +41,7 @@ class ConnectTwoConcepts():
+ print('q2 original nodes', q2.G.nodes())
+ q2_subset = q2.G.subgraph(q1_common + [self.output_values])
+ print('q2_subset nodes', q2_subset.nodes())
+- self.G = nx.compose(q1_subset, q2_subset)
++ self.G = nx.compose(q2_subset, q1_subset)
+
+ def visualize(self):
+ return visualize(self.G.edges())
+",biothings_explorer/connect.py,"ArgSwap(idxs=0<->1 @(44,21)->(44,31))","class ConnectTwoConcepts():
+ print('q2 original nodes', q2.G.nodes())
+ q2_subset = q2.G.subgraph(q1_common + [self.output_values])
+ print('q2_subset nodes', q2_subset.nodes())
+ self.G = nx.compose(q1_subset, q2_subset)
+
+ def visualize(self):
+ return visualize(self.G.edges())","class ConnectTwoConcepts():
+ print('q2 original nodes', q2.G.nodes())
+ q2_subset = q2.G.subgraph(q1_common + [self.output_values])
+ print('q2_subset nodes', q2_subset.nodes())
+ self.G = nx.compose(q2_subset, q1_subset)
+
+ def visualize(self):
+ return visualize(self.G.edges())"
+1507,https://:@github.com/QwilApp/gasofo.git,839d7bf88cc2ccbc92b980502586614db35b4f42,"@@ -144,7 +144,7 @@ class ServiceMetaclass(type):
+ raise UnknownPort('{}.{} references undeclared Needs - {}'.format(
+ class_name,
+ attr_name,
+- ', '.join(sorted(deps_used))
++ ', '.join(sorted(invalid_ports))
+ ))
+
+ unused_needs = needs_ports_defined.difference(all_deps_used)
+",gasofo/service.py,"ReplaceText(target='invalid_ports' @(147,41)->(147,50))","class ServiceMetaclass(type):
+ raise UnknownPort('{}.{} references undeclared Needs - {}'.format(
+ class_name,
+ attr_name,
+ ', '.join(sorted(deps_used))
+ ))
+
+ unused_needs = needs_ports_defined.difference(all_deps_used)","class ServiceMetaclass(type):
+ raise UnknownPort('{}.{} references undeclared Needs - {}'.format(
+ class_name,
+ attr_name,
+ ', '.join(sorted(invalid_ports))
+ ))
+
+ unused_needs = needs_ports_defined.difference(all_deps_used)"
+1508,https://:@github.com/mila-udem/blocks.git,8f71ba948707c3bc7ddbe28e0bfb2a6f26c2f626,"@@ -274,7 +274,7 @@ class Application(object):
+ annotations = getattr(copy.tag, 'annotations', []) + [brick, call]
+ copy.tag.annotations = annotations
+ copy.tag.name = name # Blocks name
+- VariableRole.add_role(variable, role)
++ VariableRole.add_role(copy, role)
+ return copy
+
+ for i, input_ in enumerate(args):
+",blocks/bricks/base.py,"ReplaceText(target='copy' @(277,34)->(277,42))","class Application(object):
+ annotations = getattr(copy.tag, 'annotations', []) + [brick, call]
+ copy.tag.annotations = annotations
+ copy.tag.name = name # Blocks name
+ VariableRole.add_role(variable, role)
+ return copy
+
+ for i, input_ in enumerate(args):","class Application(object):
+ annotations = getattr(copy.tag, 'annotations', []) + [brick, call]
+ copy.tag.annotations = annotations
+ copy.tag.name = name # Blocks name
+ VariableRole.add_role(copy, role)
+ return copy
+
+ for i, input_ in enumerate(args):"
+1509,https://:@github.com/mila-udem/blocks.git,a8c99adf643eb8c4edb40acd9c95210a07b36aea,"@@ -28,7 +28,7 @@ def test_gaussian():
+ rng = numpy.random.RandomState(1)
+
+ def check_gaussian(rng, mean, std, shape):
+- weights = IsotropicGaussian(mean, std).generate(rng, shape)
++ weights = IsotropicGaussian(std, mean).generate(rng, shape)
+ assert weights.shape == shape
+ assert weights.dtype == theano.config.floatX
+ assert_allclose(weights.mean(), mean, atol=1e-2)
+",tests/test_initialization.py,"ArgSwap(idxs=0<->1 @(31,18)->(31,35))","def test_gaussian():
+ rng = numpy.random.RandomState(1)
+
+ def check_gaussian(rng, mean, std, shape):
+ weights = IsotropicGaussian(mean, std).generate(rng, shape)
+ assert weights.shape == shape
+ assert weights.dtype == theano.config.floatX
+ assert_allclose(weights.mean(), mean, atol=1e-2)","def test_gaussian():
+ rng = numpy.random.RandomState(1)
+
+ def check_gaussian(rng, mean, std, shape):
+ weights = IsotropicGaussian(std, mean).generate(rng, shape)
+ assert weights.shape == shape
+ assert weights.dtype == theano.config.floatX
+ assert_allclose(weights.mean(), mean, atol=1e-2)"
+1510,https://:@github.com/mila-udem/blocks.git,a76f7c437ff32103fd9a66c31a1fbcc963dcc82e,"@@ -105,7 +105,7 @@ def inject_parameter_values(bricks, param_values):
+
+ params = bricks.get_params()
+ for name in params.keys():
+- if name not in params:
++ if name not in param_values:
+ logger.error(""No value is provided for the parameter {}""
+ .format(name))
+
+",blocks/serialization.py,"ReplaceText(target='param_values' @(108,23)->(108,29))","def inject_parameter_values(bricks, param_values):
+
+ params = bricks.get_params()
+ for name in params.keys():
+ if name not in params:
+ logger.error(""No value is provided for the parameter {}""
+ .format(name))
+ ","def inject_parameter_values(bricks, param_values):
+
+ params = bricks.get_params()
+ for name in params.keys():
+ if name not in param_values:
+ logger.error(""No value is provided for the parameter {}""
+ .format(name))
+ "
+1511,https://:@github.com/mila-udem/blocks.git,54dd52f080177aede81a63f58b276dd1e9cfc915,"@@ -622,7 +622,7 @@ class VariableClipping(StepRule):
+ def compute_step(self, param, previous_step):
+ if any(axis >= previous_step.ndim for axis in self.axes):
+ raise ValueError(""Invalid axes {} for {}, ndim={}"".format(
+- self.axes, param, param.ndim))
++ self.axes, param, previous_step.ndim))
+ squares = tensor.sqr(previous_step)
+ if len(self.axes) == 0:
+ norms = l2_norm([previous_step])
+",blocks/algorithms/__init__.py,"ReplaceText(target='previous_step' @(625,34)->(625,39))","class VariableClipping(StepRule):
+ def compute_step(self, param, previous_step):
+ if any(axis >= previous_step.ndim for axis in self.axes):
+ raise ValueError(""Invalid axes {} for {}, ndim={}"".format(
+ self.axes, param, param.ndim))
+ squares = tensor.sqr(previous_step)
+ if len(self.axes) == 0:
+ norms = l2_norm([previous_step])","class VariableClipping(StepRule):
+ def compute_step(self, param, previous_step):
+ if any(axis >= previous_step.ndim for axis in self.axes):
+ raise ValueError(""Invalid axes {} for {}, ndim={}"".format(
+ self.axes, param, previous_step.ndim))
+ squares = tensor.sqr(previous_step)
+ if len(self.axes) == 0:
+ norms = l2_norm([previous_step])"
+1512,https://:@github.com/jeremiedecock/pywi-cta.git,51ea19f5d8cec9f4759eb8079dc4c01295719577,"@@ -228,7 +228,7 @@ class AbstractCleaningAlgorithm(object):
+ image_dict[""img_cleaned_max_pe""] = float(np.nanmax(cleaned_img))
+ image_dict[""img_cleaned_num_pix""] = int( (cleaned_img[np.isfinite(cleaned_img)] > 0).sum() )
+
+- cleaned_img1d = geometry_converter.image_2d_to_1d(reference_img, fits_metadata_dict['cam_id'])
++ cleaned_img1d = geometry_converter.image_2d_to_1d(cleaned_img, fits_metadata_dict['cam_id'])
+ hillas_params_2_cleaned_img = get_hillas_parameters(geom1d, cleaned_img1d, HILLAS_IMPLEMENTATION) # GEOM
+
+ image_dict[""img_cleaned_hillas_2_size""] = float(hillas_params_2_cleaned_img.size)
+",datapipe/denoising/abstract_cleaning_algorithm.py,"ReplaceText(target='cleaned_img' @(231,74)->(231,87))","class AbstractCleaningAlgorithm(object):
+ image_dict[""img_cleaned_max_pe""] = float(np.nanmax(cleaned_img))
+ image_dict[""img_cleaned_num_pix""] = int( (cleaned_img[np.isfinite(cleaned_img)] > 0).sum() )
+
+ cleaned_img1d = geometry_converter.image_2d_to_1d(reference_img, fits_metadata_dict['cam_id'])
+ hillas_params_2_cleaned_img = get_hillas_parameters(geom1d, cleaned_img1d, HILLAS_IMPLEMENTATION) # GEOM
+
+ image_dict[""img_cleaned_hillas_2_size""] = float(hillas_params_2_cleaned_img.size)","class AbstractCleaningAlgorithm(object):
+ image_dict[""img_cleaned_max_pe""] = float(np.nanmax(cleaned_img))
+ image_dict[""img_cleaned_num_pix""] = int( (cleaned_img[np.isfinite(cleaned_img)] > 0).sum() )
+
+ cleaned_img1d = geometry_converter.image_2d_to_1d(cleaned_img, fits_metadata_dict['cam_id'])
+ hillas_params_2_cleaned_img = get_hillas_parameters(geom1d, cleaned_img1d, HILLAS_IMPLEMENTATION) # GEOM
+
+ image_dict[""img_cleaned_hillas_2_size""] = float(hillas_params_2_cleaned_img.size)"
+1513,https://:@github.com/jeremiedecock/pywi-cta.git,339e74ccf897012a30b4077d3ffa81a37bb005b9,"@@ -171,7 +171,7 @@ class ObjectiveFunction:
+ filter_thresholds_str = "","".join([str(sigma) for sigma in filter_thresholds])
+
+ # Check the length of filter_thresholds_str is consistent with self.num_scales
+- if len(filter_thresholds_str) != (self.num_scales - 1):
++ if len(filter_thresholds) != (self.num_scales - 1):
+ raise ValueError(""The tested solution has a wrong number of dimensions: ""
+ ""{} instead of {}"".format(len(filter_thresholds),
+ self.num_scales - 1))
+",pywicta/optimization/objectivefunc/wavelets_mrfilter.py,"ReplaceText(target='filter_thresholds' @(174,15)->(174,36))","class ObjectiveFunction:
+ filter_thresholds_str = "","".join([str(sigma) for sigma in filter_thresholds])
+
+ # Check the length of filter_thresholds_str is consistent with self.num_scales
+ if len(filter_thresholds_str) != (self.num_scales - 1):
+ raise ValueError(""The tested solution has a wrong number of dimensions: ""
+ ""{} instead of {}"".format(len(filter_thresholds),
+ self.num_scales - 1))","class ObjectiveFunction:
+ filter_thresholds_str = "","".join([str(sigma) for sigma in filter_thresholds])
+
+ # Check the length of filter_thresholds_str is consistent with self.num_scales
+ if len(filter_thresholds) != (self.num_scales - 1):
+ raise ValueError(""The tested solution has a wrong number of dimensions: ""
+ ""{} instead of {}"".format(len(filter_thresholds),
+ self.num_scales - 1))"
+1514,https://:@github.com/ros/urdf_parser_py.git,c0183ac51435815923a9a8aab17698ae29230338,"@@ -237,7 +237,7 @@ class Inertial(object):
+ mass=0.0, origin=None):
+ self.matrix = {}
+ self.matrix['ixx'] = ixx
+- self.matrix['ixy'] = iyy
++ self.matrix['ixy'] = ixy
+ self.matrix['ixz'] = ixz
+ self.matrix['iyy'] = iyy
+ self.matrix['iyz'] = iyz
+",src/urdf_parser_py/urdf.py,"ReplaceText(target='ixy' @(240,29)->(240,32))","class Inertial(object):
+ mass=0.0, origin=None):
+ self.matrix = {}
+ self.matrix['ixx'] = ixx
+ self.matrix['ixy'] = iyy
+ self.matrix['ixz'] = ixz
+ self.matrix['iyy'] = iyy
+ self.matrix['iyz'] = iyz","class Inertial(object):
+ mass=0.0, origin=None):
+ self.matrix = {}
+ self.matrix['ixx'] = ixx
+ self.matrix['ixy'] = ixy
+ self.matrix['ixz'] = ixz
+ self.matrix['iyy'] = iyy
+ self.matrix['iyz'] = iyz"
+1515,https://:@github.com/Faithforus/Colour-printing.git,f927c250c967ea52a74d60587a9709bc9a073454,"@@ -17,7 +17,7 @@ class Markers:
+ self.__cal_flag_len()
+
+ def __cal_flag_len(self):
+- if Markers.__flag_len < len(self.__flag_name):
++ if Markers.__flag_len <= len(self.__flag_name):
+ Markers.__flag_len = len(self.__flag_name)+2
+
+ def message_style(self, mode='', fore='', back=''):
+",colour_printing/custom/markers.py,"ReplaceText(target='<=' @(20,30)->(20,31))","class Markers:
+ self.__cal_flag_len()
+
+ def __cal_flag_len(self):
+ if Markers.__flag_len < len(self.__flag_name):
+ Markers.__flag_len = len(self.__flag_name)+2
+
+ def message_style(self, mode='', fore='', back=''):","class Markers:
+ self.__cal_flag_len()
+
+ def __cal_flag_len(self):
+ if Markers.__flag_len <= len(self.__flag_name):
+ Markers.__flag_len = len(self.__flag_name)+2
+
+ def message_style(self, mode='', fore='', back=''):"
+1516,https://:@github.com/ccarocean/pyrads.git,11fd786460c69972560cb02cce0a8b8b8a9ab2c9,"@@ -82,7 +82,7 @@ def ensure_open(
+ .. seealso:: :func:`open`
+ """"""
+ if hasattr(file, ""read""):
+- if closeio:
++ if not closeio:
+ return cast(IO[Any], _NoCloseIOWrapper(file))
+ return cast(IO[Any], file)
+ return open(
+",rads/utility.py,"ReplaceText(target='not ' @(85,11)->(85,11))","def ensure_open(
+ .. seealso:: :func:`open`
+ """"""
+ if hasattr(file, ""read""):
+ if closeio:
+ return cast(IO[Any], _NoCloseIOWrapper(file))
+ return cast(IO[Any], file)
+ return open(","def ensure_open(
+ .. seealso:: :func:`open`
+ """"""
+ if hasattr(file, ""read""):
+ if not closeio:
+ return cast(IO[Any], _NoCloseIOWrapper(file))
+ return cast(IO[Any], file)
+ return open("
+1517,https://:@github.com/paulsbond/modelcraft.git,688d05f50a4c1ded44fdd3d0309fbeaadf762807,"@@ -88,7 +88,7 @@ class Pipeline():
+ def refmac(self, cycles):
+ directory = self.job_directory(""refmac"")
+ use_phases = self.args.unbiased and self.min_rwork > 0.35
+- job = Refmac(self.args, directory, self.current_xyz, use_phases, cycles)
++ job = Refmac(self.args, directory, self.current_xyz, cycles, use_phases)
+ self.jobs[self.cycle].append(job)
+ self.current_hkl = job.hklout
+ self.current_xyz = job.xyzout
+",modelcraft/pipeline.py,"ArgSwap(idxs=3<->4 @(91,14)->(91,20))","class Pipeline():
+ def refmac(self, cycles):
+ directory = self.job_directory(""refmac"")
+ use_phases = self.args.unbiased and self.min_rwork > 0.35
+ job = Refmac(self.args, directory, self.current_xyz, use_phases, cycles)
+ self.jobs[self.cycle].append(job)
+ self.current_hkl = job.hklout
+ self.current_xyz = job.xyzout","class Pipeline():
+ def refmac(self, cycles):
+ directory = self.job_directory(""refmac"")
+ use_phases = self.args.unbiased and self.min_rwork > 0.35
+ job = Refmac(self.args, directory, self.current_xyz, cycles, use_phases)
+ self.jobs[self.cycle].append(job)
+ self.current_hkl = job.hklout
+ self.current_xyz = job.xyzout"
+1518,https://:@github.com/gaoyunzhi/readee.git,699c229fdcc1ddd2dd52b72d7b7e4b4da76a7585,"@@ -33,7 +33,7 @@ def _tagReplace(soup, args = {}):
+ if len(children) != 1 or not isinstance(children[0], str):
+ continue
+ to_replace = None
+- if l.parent.name != 'blockquote': # douban status specific
++ if l.parent.name == 'blockquote': # douban status specific
+ to_replace = l.parent
+ if 'review-content' in str(l.parent.attrs): # douban reviews specific
+ to_replace = l
+",readee/tag_replace.py,"ReplaceText(target='==' @(36,19)->(36,21))","def _tagReplace(soup, args = {}):
+ if len(children) != 1 or not isinstance(children[0], str):
+ continue
+ to_replace = None
+ if l.parent.name != 'blockquote': # douban status specific
+ to_replace = l.parent
+ if 'review-content' in str(l.parent.attrs): # douban reviews specific
+ to_replace = l","def _tagReplace(soup, args = {}):
+ if len(children) != 1 or not isinstance(children[0], str):
+ continue
+ to_replace = None
+ if l.parent.name == 'blockquote': # douban status specific
+ to_replace = l.parent
+ if 'review-content' in str(l.parent.attrs): # douban reviews specific
+ to_replace = l"
+1519,https://:@github.com/bkad/gevent.git,3444f110d767c8985127c4421c4f79f206122ad5,"@@ -313,7 +313,7 @@ def _parse_address(address):
+ host = ''
+ return family, (host, int(port))
+ else:
+- return _socket.AF_INET, ('', int(port))
++ return _socket.AF_INET, ('', int(address))
+ elif isinstance(address, integer_types):
+ return _socket.AF_INET, ('', int(address))
+ else:
+",gevent/baseserver.py,"ReplaceText(target='address' @(316,45)->(316,49))","def _parse_address(address):
+ host = ''
+ return family, (host, int(port))
+ else:
+ return _socket.AF_INET, ('', int(port))
+ elif isinstance(address, integer_types):
+ return _socket.AF_INET, ('', int(address))
+ else:","def _parse_address(address):
+ host = ''
+ return family, (host, int(port))
+ else:
+ return _socket.AF_INET, ('', int(address))
+ elif isinstance(address, integer_types):
+ return _socket.AF_INET, ('', int(address))
+ else:"
+1520,https://:@github.com/jerith/txTwitter.git,05cb3871bd345ea0850b223388f37f5a7cf5c3c5,"@@ -517,7 +517,7 @@ class FakeTwitterAPI(object):
+ self._twitter_data.iter_tweets_from(user_id), count, since_id,
+ max_id)
+ if exclude_replies:
+- tweets = [tweet for tweet in tweets if tweet.reply_to is not None]
++ tweets = [tweet for tweet in tweets if tweet.reply_to is None]
+ if include_rts is not None:
+ raise NotImplementedError(""exclude_rts param"")
+ return [
+",txtwitter/tests/fake_twitter.py,"ReplaceText(target=' is ' @(520,65)->(520,73))","class FakeTwitterAPI(object):
+ self._twitter_data.iter_tweets_from(user_id), count, since_id,
+ max_id)
+ if exclude_replies:
+ tweets = [tweet for tweet in tweets if tweet.reply_to is not None]
+ if include_rts is not None:
+ raise NotImplementedError(""exclude_rts param"")
+ return [","class FakeTwitterAPI(object):
+ self._twitter_data.iter_tweets_from(user_id), count, since_id,
+ max_id)
+ if exclude_replies:
+ tweets = [tweet for tweet in tweets if tweet.reply_to is None]
+ if include_rts is not None:
+ raise NotImplementedError(""exclude_rts param"")
+ return ["
+1521,https://:@github.com/rainwoodman/gaepsi.git,2a3b9fca6494eeb84a68cd82e4c8bd1e04f7652f,"@@ -49,7 +49,7 @@ class Snapshot:
+ return [self.P[ptype][bn] for bn in blocknames]
+
+ def has(self, blockname, ptype):
+- return self.reader.has_block(self, ptype, blockname)
++ return self.reader.has_block(self, blockname, ptype)
+
+ def save_header(self):
+ self.reader.write_header(self)
+",snapshot.py,"ArgSwap(idxs=1<->2 @(52,11)->(52,32))","class Snapshot:
+ return [self.P[ptype][bn] for bn in blocknames]
+
+ def has(self, blockname, ptype):
+ return self.reader.has_block(self, ptype, blockname)
+
+ def save_header(self):
+ self.reader.write_header(self)","class Snapshot:
+ return [self.P[ptype][bn] for bn in blocknames]
+
+ def has(self, blockname, ptype):
+ return self.reader.has_block(self, blockname, ptype)
+
+ def save_header(self):
+ self.reader.write_header(self)"
+1522,https://:@github.com/staffanm/ferenda.git,250cc870c14cbb8089ffd9b1f4dab44865ab4e7d,"@@ -4,7 +4,7 @@ from ferenda.sources.legal.se import SwedishLegalSource
+
+ class LocalURI(SwedishLegalSource):
+ def infer_triples(self, d, basefile=None):
+- super(self, LocalURI).infer_triples(d,basefile)
++ super(LocalURI, self).infer_triples(d,basefile)
+ canonicalminter = ...
+ sameas = self.canonicalminter(d)
+ d.rel(OWL.sameAs, sameas)
+",lagen/nu/localuri.py,"ArgSwap(idxs=0<->1 @(7,8)->(7,13))","from ferenda.sources.legal.se import SwedishLegalSource
+
+ class LocalURI(SwedishLegalSource):
+ def infer_triples(self, d, basefile=None):
+ super(self, LocalURI).infer_triples(d,basefile)
+ canonicalminter = ...
+ sameas = self.canonicalminter(d)
+ d.rel(OWL.sameAs, sameas)","from ferenda.sources.legal.se import SwedishLegalSource
+
+ class LocalURI(SwedishLegalSource):
+ def infer_triples(self, d, basefile=None):
+ super(LocalURI, self).infer_triples(d,basefile)
+ canonicalminter = ...
+ sameas = self.canonicalminter(d)
+ d.rel(OWL.sameAs, sameas)"
+1523,https://:@github.com/staffanm/ferenda.git,268b56a25bb57f04675661603eea670fe33d7085,"@@ -458,7 +458,7 @@ class Offtryck(SwedishLegalSource):
+ else:
+ initialstate['pageno'] = lastpagebreak.ordinal + 1
+ allbody += body[:]
+- self.validate_body(body, basefile) # Throws exception if invalid
++ self.validate_body(allbody, basefile) # Throws exception if invalid
+ return allbody
+ except Exception as e:
+ errmsg = str(e)
+",ferenda/sources/legal/se/offtryck.py,"ReplaceText(target='allbody' @(461,35)->(461,39))","class Offtryck(SwedishLegalSource):
+ else:
+ initialstate['pageno'] = lastpagebreak.ordinal + 1
+ allbody += body[:]
+ self.validate_body(body, basefile) # Throws exception if invalid
+ return allbody
+ except Exception as e:
+ errmsg = str(e)","class Offtryck(SwedishLegalSource):
+ else:
+ initialstate['pageno'] = lastpagebreak.ordinal + 1
+ allbody += body[:]
+ self.validate_body(allbody, basefile) # Throws exception if invalid
+ return allbody
+ except Exception as e:
+ errmsg = str(e)"
+1524,https://:@github.com/staffanm/ferenda.git,133ebd33435acb8a7d6ed611341c50755881538e,"@@ -56,7 +56,7 @@ class TestGlue(unittest.TestCase):
+ self._f('')
+ textbox = self._p('Det är nu hög tid att göra en kraftsamling för informationsförsörj-')
+ prevbox = self._p('ningen till forskning och utbildning.')
+- self.assertTrue(self.gluefunc(prevbox, prevbox, textbox))
++ self.assertTrue(self.gluefunc(textbox, prevbox, textbox))
+ textbox = textbox + prevbox
+ nextbox = self._p(' Den tekniska utvecklingen går ')
+ self.assertTrue(self.gluefunc(textbox, nextbox, prevbox))
+",test/integrationOfftryck.py,"ReplaceText(target='textbox' @(59,38)->(59,45))","class TestGlue(unittest.TestCase):
+ self._f('')
+ textbox = self._p('Det är nu hög tid att göra en kraftsamling för informationsförsörj-')
+ prevbox = self._p('ningen till forskning och utbildning.')
+ self.assertTrue(self.gluefunc(prevbox, prevbox, textbox))
+ textbox = textbox + prevbox
+ nextbox = self._p(' Den tekniska utvecklingen går ')
+ self.assertTrue(self.gluefunc(textbox, nextbox, prevbox))","class TestGlue(unittest.TestCase):
+ self._f('')
+ textbox = self._p('Det är nu hög tid att göra en kraftsamling för informationsförsörj-')
+ prevbox = self._p('ningen till forskning och utbildning.')
+ self.assertTrue(self.gluefunc(textbox, prevbox, textbox))
+ textbox = textbox + prevbox
+ nextbox = self._p(' Den tekniska utvecklingen går ')
+ self.assertTrue(self.gluefunc(textbox, nextbox, prevbox))"
+1525,https://:@github.com/staffanm/ferenda.git,699fb245c4cb447a0f8cf7d4fd62bbb1d6efcfec,"@@ -986,7 +986,7 @@ with the *config* object as single parameter.
+ if response.status_code == 304:
+ self.log.debug(""%s: 304 Not modified"" % url)
+ return False # ie not updated
+- elif response.status_code > 400:
++ elif response.status_code >= 400:
+ self.log.error(""Failed to retrieve %s"" % url)
+ response.raise_for_status()
+
+",ferenda/documentrepository.py,"ReplaceText(target='>=' @(989,34)->(989,35))","with the *config* object as single parameter.
+ if response.status_code == 304:
+ self.log.debug(""%s: 304 Not modified"" % url)
+ return False # ie not updated
+ elif response.status_code > 400:
+ self.log.error(""Failed to retrieve %s"" % url)
+ response.raise_for_status()
+ ","with the *config* object as single parameter.
+ if response.status_code == 304:
+ self.log.debug(""%s: 304 Not modified"" % url)
+ return False # ie not updated
+ elif response.status_code >= 400:
+ self.log.error(""Failed to retrieve %s"" % url)
+ response.raise_for_status()
+ "
+1526,https://:@github.com/staffanm/ferenda.git,158f09f9d9152ccb71b1af4a60a17e53349f0226,"@@ -561,7 +561,7 @@ class Offtryck(SwedishLegalSource):
+ # fix the json file at pagemapping_path as well?
+ for idx, page in enumerate(sanitized):
+ sanitized[idx].number = idx + 1
+- sanitized[idx].src = ""%s/sid%s.png"" % (basefile, idx+1)
++ sanitized[idx].src = ""%s/sid%s.png"" % (baseuri, idx+1)
+ else:
+ analyzer = sanitized.analyzer
+ if not os.path.exists(pagemapping_path) or self.config.force:
+",ferenda/sources/legal/se/offtryck.py,"ReplaceText(target='baseuri' @(564,55)->(564,63))","class Offtryck(SwedishLegalSource):
+ # fix the json file at pagemapping_path as well?
+ for idx, page in enumerate(sanitized):
+ sanitized[idx].number = idx + 1
+ sanitized[idx].src = ""%s/sid%s.png"" % (basefile, idx+1)
+ else:
+ analyzer = sanitized.analyzer
+ if not os.path.exists(pagemapping_path) or self.config.force:","class Offtryck(SwedishLegalSource):
+ # fix the json file at pagemapping_path as well?
+ for idx, page in enumerate(sanitized):
+ sanitized[idx].number = idx + 1
+ sanitized[idx].src = ""%s/sid%s.png"" % (baseuri, idx+1)
+ else:
+ analyzer = sanitized.analyzer
+ if not os.path.exists(pagemapping_path) or self.config.force:"
+1527,https://:@github.com/pyopenapi/pyopenapi.git,fbe951506252bffe083942c246736bca14f13a4c,"@@ -30,7 +30,7 @@ class SwaggerApp(BaseObj):
+ # default initialization is passing the url
+ # you can override this behavior by passing an
+ # initialized getter object.
+- local_getter = getter(url)
++ local_getter = local_getter(url)
+
+ ctx = ResourceListContext(None, local_getter)
+ ctx.parse()
+",pyopenapi/core.py,"ReplaceText(target='local_getter' @(33,27)->(33,33))","class SwaggerApp(BaseObj):
+ # default initialization is passing the url
+ # you can override this behavior by passing an
+ # initialized getter object.
+ local_getter = getter(url)
+
+ ctx = ResourceListContext(None, local_getter)
+ ctx.parse()","class SwaggerApp(BaseObj):
+ # default initialization is passing the url
+ # you can override this behavior by passing an
+ # initialized getter object.
+ local_getter = local_getter(url)
+
+ ctx = ResourceListContext(None, local_getter)
+ ctx.parse()"
+1528,https://:@github.com/pyopenapi/pyopenapi.git,54bdc346b45deb8277831a7ac70886bc81568696,"@@ -39,7 +39,7 @@ class ScopeDict(dict):
+
+ def __init__(self, sep=SCOPE_SEPARATOR):
+ self.__sep = sep
+- super(self, ScopeDict).__init__()
++ super(ScopeDict, self).__init__()
+
+ def __getitem__(self, *keys):
+ """""" to access an obj with key: 'n!##!m...!##!z', caller can pass as key:
+",pyopenapi/utils.py,"ArgSwap(idxs=0<->1 @(42,8)->(42,13))","class ScopeDict(dict):
+
+ def __init__(self, sep=SCOPE_SEPARATOR):
+ self.__sep = sep
+ super(self, ScopeDict).__init__()
+
+ def __getitem__(self, *keys):
+ """""" to access an obj with key: 'n!##!m...!##!z', caller can pass as key:","class ScopeDict(dict):
+
+ def __init__(self, sep=SCOPE_SEPARATOR):
+ self.__sep = sep
+ super(ScopeDict, self).__init__()
+
+ def __getitem__(self, *keys):
+ """""" to access an obj with key: 'n!##!m...!##!z', caller can pass as key:"
+1529,https://:@github.com/clindatsci/dicomweb-client.git,a8426098bf10c893366be9043bc3366a47c22b48,"@@ -1427,7 +1427,7 @@ class DICOMwebClient(object):
+ response = self._session.post(
+ url=url,
+ data=data_chunks,
+- headers=headers
++ headers=chunked_headers
+ )
+ else:
+ response = self._session.post(url=url, data=data, headers=headers)
+",src/dicomweb_client/api.py,"ReplaceText(target='chunked_headers' @(1430,24)->(1430,31))","class DICOMwebClient(object):
+ response = self._session.post(
+ url=url,
+ data=data_chunks,
+ headers=headers
+ )
+ else:
+ response = self._session.post(url=url, data=data, headers=headers)","class DICOMwebClient(object):
+ response = self._session.post(
+ url=url,
+ data=data_chunks,
+ headers=chunked_headers
+ )
+ else:
+ response = self._session.post(url=url, data=data, headers=headers)"
+1530,https://:@github.com/clindatsci/dicomweb-client.git,e9d9410e7de9108e6cda82c5c44a3fb177e32163,"@@ -403,7 +403,7 @@ class DICOMwebClient(object):
+ self._session.proxies = proxies
+ if callback is not None:
+ self._session.hooks = {'response': [callback, ]}
+- if chunk_size is not None:
++ if chunk_size is None:
+ # There is a bug in the requests library that sets the Host header
+ # again when using chunked transer encoding. Apparently this is
+ # tricky to fix (see https://github.com/psf/requests/issues/4392).
+",src/dicomweb_client/api.py,"ReplaceText(target=' is ' @(406,21)->(406,29))","class DICOMwebClient(object):
+ self._session.proxies = proxies
+ if callback is not None:
+ self._session.hooks = {'response': [callback, ]}
+ if chunk_size is not None:
+ # There is a bug in the requests library that sets the Host header
+ # again when using chunked transer encoding. Apparently this is
+ # tricky to fix (see https://github.com/psf/requests/issues/4392).","class DICOMwebClient(object):
+ self._session.proxies = proxies
+ if callback is not None:
+ self._session.hooks = {'response': [callback, ]}
+ if chunk_size is None:
+ # There is a bug in the requests library that sets the Host header
+ # again when using chunked transer encoding. Apparently this is
+ # tricky to fix (see https://github.com/psf/requests/issues/4392)."
+1531,https://:@gitlab.com/koala-lms/django-learning.git,600bf3b8691699936ebffccd7f31f2f937eab388,"@@ -88,7 +88,7 @@ class ActivityCreateOnCourseView(LoginRequiredMixin, PermissionRequiredMixin, Up
+
+ def form_invalid(self, form):
+ for sub_form in form:
+- update_valid_or_invalid_form_fields(form)
++ update_valid_or_invalid_form_fields(sub_form)
+ for error in sub_form.errors:
+ messages.error(self.request, sub_form.errors[error])
+ return self.get_success_url()
+",learning/views/activity.py,"ReplaceText(target='sub_form' @(91,48)->(91,52))","class ActivityCreateOnCourseView(LoginRequiredMixin, PermissionRequiredMixin, Up
+
+ def form_invalid(self, form):
+ for sub_form in form:
+ update_valid_or_invalid_form_fields(form)
+ for error in sub_form.errors:
+ messages.error(self.request, sub_form.errors[error])
+ return self.get_success_url()","class ActivityCreateOnCourseView(LoginRequiredMixin, PermissionRequiredMixin, Up
+
+ def form_invalid(self, form):
+ for sub_form in form:
+ update_valid_or_invalid_form_fields(sub_form)
+ for error in sub_form.errors:
+ messages.error(self.request, sub_form.errors[error])
+ return self.get_success_url()"
+1532,https://:@github.com/finderseyes/upkit.git,5f39342aa3261683f3aa675617c9f505409c346f,"@@ -172,7 +172,7 @@ class PackageLinker(object):
+ item_source = os.path.abspath(os.path.join(source, item['source']))
+ item_target = os.path.abspath(self._render_template(item['target'], params))
+
+- content = package_linkspec.get('content', None)
++ content = item.get('content', None)
+ if not content:
+ utils.fs_link(item_source, item_target, hard_link=True, forced=forced)
+ else:
+",unity_tools/package_linker.py,"ReplaceText(target='item' @(175,26)->(175,42))","class PackageLinker(object):
+ item_source = os.path.abspath(os.path.join(source, item['source']))
+ item_target = os.path.abspath(self._render_template(item['target'], params))
+
+ content = package_linkspec.get('content', None)
+ if not content:
+ utils.fs_link(item_source, item_target, hard_link=True, forced=forced)
+ else:","class PackageLinker(object):
+ item_source = os.path.abspath(os.path.join(source, item['source']))
+ item_target = os.path.abspath(self._render_template(item['target'], params))
+
+ content = item.get('content', None)
+ if not content:
+ utils.fs_link(item_source, item_target, hard_link=True, forced=forced)
+ else:"
+1533,https://:@github.com/spoorcc/cppumockify.git,8b4f2089cda3cc3071cd8fb5d83a36c5f6b0552b,"@@ -82,7 +82,7 @@ class MockError(Exception):
+ def generate_mock(mocked_module, mock_prototype):
+ ''' Generates the mock '''
+ mock_filename = ""{0}_mock.cpp"".format(mocked_module)
+- include_filename = ""{0}.h"".format(mock_filename)
++ include_filename = ""{0}.h"".format(mocked_module)
+ logger.debug(""working directory: %s"", os.getcwd())
+ logger.debug(""mock_filename: %s"", mock_filename)
+ logger.debug(""include_filename: %s"", include_filename)
+",cppumockify.py,"ReplaceText(target='mocked_module' @(85,38)->(85,51))","class MockError(Exception):
+ def generate_mock(mocked_module, mock_prototype):
+ ''' Generates the mock '''
+ mock_filename = ""{0}_mock.cpp"".format(mocked_module)
+ include_filename = ""{0}.h"".format(mock_filename)
+ logger.debug(""working directory: %s"", os.getcwd())
+ logger.debug(""mock_filename: %s"", mock_filename)
+ logger.debug(""include_filename: %s"", include_filename)","class MockError(Exception):
+ def generate_mock(mocked_module, mock_prototype):
+ ''' Generates the mock '''
+ mock_filename = ""{0}_mock.cpp"".format(mocked_module)
+ include_filename = ""{0}.h"".format(mocked_module)
+ logger.debug(""working directory: %s"", os.getcwd())
+ logger.debug(""mock_filename: %s"", mock_filename)
+ logger.debug(""include_filename: %s"", include_filename)"
+1534,https://:@github.com/pigmonkey/django-vellum.git,f8edc139fe9f8a6d6e63af6d6b1a2a42d3c38002,"@@ -208,7 +208,7 @@ def tag_detail(request, slug, page=0, **kwargs):
+
+ return list_detail.object_list(
+ request,
+- queryset=Post.objects.filter(tags__name__in=[slug]),
++ queryset=Post.objects.filter(tags__name__in=[tag]),
+ paginate_by=blog_settings.BLOG_PAGESIZE,
+ page=page,
+ extra_context={
+",basic/blog/views.py,"ReplaceText(target='tag' @(211,53)->(211,57))","def tag_detail(request, slug, page=0, **kwargs):
+
+ return list_detail.object_list(
+ request,
+ queryset=Post.objects.filter(tags__name__in=[slug]),
+ paginate_by=blog_settings.BLOG_PAGESIZE,
+ page=page,
+ extra_context={","def tag_detail(request, slug, page=0, **kwargs):
+
+ return list_detail.object_list(
+ request,
+ queryset=Post.objects.filter(tags__name__in=[tag]),
+ paginate_by=blog_settings.BLOG_PAGESIZE,
+ page=page,
+ extra_context={"
+1535,https://:@github.com/asoroa/ical2org.py.git,ac33b4760b1d87eb35ce9892e329dc6926d83f57,"@@ -63,7 +63,7 @@ def recurring_event_days(event_start, event_end, delta_str, start_utc, end_utc):
+ else :
+ event_aux = event_start
+
+- while event_aux < end_utc:
++ while event_aux <= end_utc:
+ result.append( (event_aux, event_aux.tzinfo.normalize(event_aux + event_duration), 1) )
+ event_aux = add_delta_dst(event_aux, delta)
+ return result
+",ical2org.py,"ReplaceText(target='<=' @(66,20)->(66,21))","def recurring_event_days(event_start, event_end, delta_str, start_utc, end_utc):
+ else :
+ event_aux = event_start
+
+ while event_aux < end_utc:
+ result.append( (event_aux, event_aux.tzinfo.normalize(event_aux + event_duration), 1) )
+ event_aux = add_delta_dst(event_aux, delta)
+ return result","def recurring_event_days(event_start, event_end, delta_str, start_utc, end_utc):
+ else :
+ event_aux = event_start
+
+ while event_aux <= end_utc:
+ result.append( (event_aux, event_aux.tzinfo.normalize(event_aux + event_duration), 1) )
+ event_aux = add_delta_dst(event_aux, delta)
+ return result"
+1536,https://:@github.com/PaloAltoNetworks/ansible-pan.git,370d08e2204b387e30596c6cec3ddb388acc11dc,"@@ -434,7 +434,7 @@ def main():
+ if destination_lower <= obj <= destination_upper:
+ destination_ip_match = True
+ else:
+- if source_ip == object_string:
++ if destination_ip == object_string:
+ destination_ip_match = True
+ if isinstance(obj, objects.AddressObject) and addr_in_obj(destination_ip, obj):
+ destination_ip_match = True
+",library/panos_query_rules.py,"ReplaceText(target='destination_ip' @(437,31)->(437,40))","def main():
+ if destination_lower <= obj <= destination_upper:
+ destination_ip_match = True
+ else:
+ if source_ip == object_string:
+ destination_ip_match = True
+ if isinstance(obj, objects.AddressObject) and addr_in_obj(destination_ip, obj):
+ destination_ip_match = True","def main():
+ if destination_lower <= obj <= destination_upper:
+ destination_ip_match = True
+ else:
+ if destination_ip == object_string:
+ destination_ip_match = True
+ if isinstance(obj, objects.AddressObject) and addr_in_obj(destination_ip, obj):
+ destination_ip_match = True"
+1537,https://:@github.com/bond005/impartial_text_cls.git,d81895309fc7a26004fb50e5b5ced3fd62307c46,"@@ -97,7 +97,7 @@ class ImpatialTextClassifier(BaseEstimator, ClassifierMixin):
+ if self.verbose:
+ lengths_of_texts = []
+ sum_of_lengths = 0
+- for sample_idx in range(len(y_train_)):
++ for sample_idx in range(len(y_train_tokenized)):
+ lengths_of_texts.append(sum(X_train_tokenized[1][sample_idx]))
+ sum_of_lengths += lengths_of_texts[-1]
+ if X_unlabeled_tokenized is not None:
+",impatial_text_cls/impatial_text_cls.py,"ReplaceText(target='y_train_tokenized' @(100,40)->(100,48))","class ImpatialTextClassifier(BaseEstimator, ClassifierMixin):
+ if self.verbose:
+ lengths_of_texts = []
+ sum_of_lengths = 0
+ for sample_idx in range(len(y_train_)):
+ lengths_of_texts.append(sum(X_train_tokenized[1][sample_idx]))
+ sum_of_lengths += lengths_of_texts[-1]
+ if X_unlabeled_tokenized is not None:","class ImpatialTextClassifier(BaseEstimator, ClassifierMixin):
+ if self.verbose:
+ lengths_of_texts = []
+ sum_of_lengths = 0
+ for sample_idx in range(len(y_train_tokenized)):
+ lengths_of_texts.append(sum(X_train_tokenized[1][sample_idx]))
+ sum_of_lengths += lengths_of_texts[-1]
+ if X_unlabeled_tokenized is not None:"
+1538,https://:@bitbucket.org/padraicshafer/pkgscript.git,2839ec817483697e30480486957df7e82994eae1,"@@ -131,7 +131,7 @@ def get_versions():
+ pass
+
+ return_key_values = _get_versions()
+- return_key_values[""authors""] = pieces[""authors""]
++ return_key_values[""authors""] = default_keys_values[""authors""]
+ return return_key_values
+
+
+",pkgscript/version.py,"ReplaceText(target='default_keys_values' @(134,35)->(134,41))","def get_versions():
+ pass
+
+ return_key_values = _get_versions()
+ return_key_values[""authors""] = pieces[""authors""]
+ return return_key_values
+
+ ","def get_versions():
+ pass
+
+ return_key_values = _get_versions()
+ return_key_values[""authors""] = default_keys_values[""authors""]
+ return return_key_values
+
+ "
+1539,https://:@github.com/rpatterson/iiswsgi.git,5be4e27875d2e28bfe7148ecc90b995c6e32c828,"@@ -43,7 +43,7 @@ app_attr_defaults_init = dict(
+ def get_web_config_apps(web_config):
+ doc = minidom.parse(web_config)
+ for fcgi in doc.getElementsByTagName(""fastCgi""):
+- for app in doc.getElementsByTagName(""application""):
++ for app in fcgi.getElementsByTagName(""application""):
+ yield dict((key, value) for key, value in app.attributes.items())
+
+
+",iiswsgi/deploy.py,"ReplaceText(target='fcgi' @(46,19)->(46,22))","app_attr_defaults_init = dict(
+ def get_web_config_apps(web_config):
+ doc = minidom.parse(web_config)
+ for fcgi in doc.getElementsByTagName(""fastCgi""):
+ for app in doc.getElementsByTagName(""application""):
+ yield dict((key, value) for key, value in app.attributes.items())
+
+ ","app_attr_defaults_init = dict(
+ def get_web_config_apps(web_config):
+ doc = minidom.parse(web_config)
+ for fcgi in doc.getElementsByTagName(""fastCgi""):
+ for app in fcgi.getElementsByTagName(""application""):
+ yield dict((key, value) for key, value in app.attributes.items())
+
+ "
+1540,https://:@github.com/Sebatyne/django-feed-manager.git,d54f6eb66e1e6fd5b848fcb1d330eccadf3e369c,"@@ -48,7 +48,7 @@ class FeedView(SyndicationFeed):
+ @csrf_exempt
+ def createAccount(request):
+ if 'username' not in request.POST \
+- or 'password' not in request.POST:
++ and 'password' not in request.POST:
+ return HttpResponse(status=500)
+
+ user = User.objects.create_user(request.POST['username'], password=request.POST['password'], is_active=False)
+",feedmanager/views.py,"ReplaceText(target='and' @(51,12)->(51,14))","class FeedView(SyndicationFeed):
+ @csrf_exempt
+ def createAccount(request):
+ if 'username' not in request.POST \
+ or 'password' not in request.POST:
+ return HttpResponse(status=500)
+
+ user = User.objects.create_user(request.POST['username'], password=request.POST['password'], is_active=False)","class FeedView(SyndicationFeed):
+ @csrf_exempt
+ def createAccount(request):
+ if 'username' not in request.POST \
+ and 'password' not in request.POST:
+ return HttpResponse(status=500)
+
+ user = User.objects.create_user(request.POST['username'], password=request.POST['password'], is_active=False)"
+1541,https://:@github.com/pjdelport/django-payfast.git,8b9de727d901a6698a8f7118d73ffb5e8d7fa1d0,"@@ -32,7 +32,7 @@ def data_is_valid(post_data, postback_url=POSTBACK_URL):
+ """"""
+ post_str = urlencode(_values_to_encode(post_data))
+ try:
+- response = urllib2.urlopen(postback_url, post_data).read()
++ response = urllib2.urlopen(postback_url, post_str).read()
+ except urllib2.HTTPError:
+ return None
+ if response == 'VALID':
+",payfast/api.py,"ReplaceText(target='post_str' @(35,49)->(35,58))","def data_is_valid(post_data, postback_url=POSTBACK_URL):
+ """"""
+ post_str = urlencode(_values_to_encode(post_data))
+ try:
+ response = urllib2.urlopen(postback_url, post_data).read()
+ except urllib2.HTTPError:
+ return None
+ if response == 'VALID':","def data_is_valid(post_data, postback_url=POSTBACK_URL):
+ """"""
+ post_str = urlencode(_values_to_encode(post_data))
+ try:
+ response = urllib2.urlopen(postback_url, post_str).read()
+ except urllib2.HTTPError:
+ return None
+ if response == 'VALID':"
+1542,https://:@github.com/engdan77/tasks_collector.git,80b4eb078fcfec4fdc9c24632f779dddd1e17822,"@@ -370,7 +370,7 @@ def get_lowest_value(input_dict_list: Dict, key_name: str) -> int:
+ for d in input_dict_list:
+ current_value = d[key_name]
+ if type(current_value) is int:
+- if current_value < lowest:
++ if current_value >= lowest:
+ lowest = current_value
+ return lowest
+
+",tasks_collector/reportgenerator/api.py,"ReplaceText(target='>=' @(373,29)->(373,30))","def get_lowest_value(input_dict_list: Dict, key_name: str) -> int:
+ for d in input_dict_list:
+ current_value = d[key_name]
+ if type(current_value) is int:
+ if current_value < lowest:
+ lowest = current_value
+ return lowest
+ ","def get_lowest_value(input_dict_list: Dict, key_name: str) -> int:
+ for d in input_dict_list:
+ current_value = d[key_name]
+ if type(current_value) is int:
+ if current_value >= lowest:
+ lowest = current_value
+ return lowest
+ "
+1543,https://:@github.com/Princeton-CDH/django-annotator-store.git,4572a52a6ec49dc039b9b2b06039e2698e638bdb,"@@ -46,7 +46,7 @@ def search(request):
+ if 'collection' in request.GET:
+ filter_val = request.GET['collection']
+ # filter the solr query based on the requested collection
+- q = solr.query(collection_label='""%s""' % filter_val)
++ q = q.query(collection_label='""%s""' % filter_val)
+ # generate link to remove the facet
+ unfacet_urlopts = url_params.copy()
+ del unfacet_urlopts['collection']
+",readux/books/views.py,"ReplaceText(target='q' @(49,16)->(49,20))","def search(request):
+ if 'collection' in request.GET:
+ filter_val = request.GET['collection']
+ # filter the solr query based on the requested collection
+ q = solr.query(collection_label='""%s""' % filter_val)
+ # generate link to remove the facet
+ unfacet_urlopts = url_params.copy()
+ del unfacet_urlopts['collection']","def search(request):
+ if 'collection' in request.GET:
+ filter_val = request.GET['collection']
+ # filter the solr query based on the requested collection
+ q = q.query(collection_label='""%s""' % filter_val)
+ # generate link to remove the facet
+ unfacet_urlopts = url_params.copy()
+ del unfacet_urlopts['collection']"
+1544,https://:@github.com/unlearnai/genemunge.git,84d323239f43571ccc95bb80caa76fbac464d917,"@@ -108,7 +108,7 @@ def create_tissue_stats():
+ fraction_zero, pandas.DataFrame(
+ (tpm == 0).mean().astype(float), columns=[t])], axis=1)
+ # Convert tpms to clr with 0.5*min imputation
+- clr = norm.clr_from_tpm(tissue_expression, imputer=normalize.impute)
++ clr = norm.clr_from_tpm(tpm, imputer=normalize.impute)
+ mean_clr = pandas.concat(
+ [mean_clr, pandas.DataFrame(clr.mean(), columns=[t])], axis=1)
+ median_clr = pandas.concat(
+",genemunge/data/gtex/process_gtex.py,"ReplaceText(target='tpm' @(111,32)->(111,49))","def create_tissue_stats():
+ fraction_zero, pandas.DataFrame(
+ (tpm == 0).mean().astype(float), columns=[t])], axis=1)
+ # Convert tpms to clr with 0.5*min imputation
+ clr = norm.clr_from_tpm(tissue_expression, imputer=normalize.impute)
+ mean_clr = pandas.concat(
+ [mean_clr, pandas.DataFrame(clr.mean(), columns=[t])], axis=1)
+ median_clr = pandas.concat(","def create_tissue_stats():
+ fraction_zero, pandas.DataFrame(
+ (tpm == 0).mean().astype(float), columns=[t])], axis=1)
+ # Convert tpms to clr with 0.5*min imputation
+ clr = norm.clr_from_tpm(tpm, imputer=normalize.impute)
+ mean_clr = pandas.concat(
+ [mean_clr, pandas.DataFrame(clr.mean(), columns=[t])], axis=1)
+ median_clr = pandas.concat("
+1545,https://:@github.com/robotpt/interaction-engine.git,e12a35db12e4e97431f0c5be18034c545fa0dc48,"@@ -90,7 +90,7 @@ class TextPopulator:
+ else:
+ default_value = None
+
+- if DatabasePopulator.Tags.POST_OP in kwargs and is_test:
++ if DatabasePopulator.Tags.POST_OP in kwargs and not is_test:
+ fn = kwargs[DatabasePopulator.Tags.POST_OP]
+ value = self._database_populator.get_replacement(
+ key,
+",text_populator/populator.py,"ReplaceText(target='not ' @(93,60)->(93,60))","class TextPopulator:
+ else:
+ default_value = None
+
+ if DatabasePopulator.Tags.POST_OP in kwargs and is_test:
+ fn = kwargs[DatabasePopulator.Tags.POST_OP]
+ value = self._database_populator.get_replacement(
+ key,","class TextPopulator:
+ else:
+ default_value = None
+
+ if DatabasePopulator.Tags.POST_OP in kwargs and not is_test:
+ fn = kwargs[DatabasePopulator.Tags.POST_OP]
+ value = self._database_populator.get_replacement(
+ key,"
+1546,https://:@github.com/Storj/storj-kademlia.git,61631b21db3a4204bef38431799244fda90e7e4d,"@@ -9,7 +9,7 @@ from kademlia.log import Logger
+ class KademliaProtocol(RPCProtocol):
+ def __init__(self, sourceNode, storage, ksize):
+ RPCProtocol.__init__(self)
+- self.router = RoutingTable(self, sourceNode, ksize)
++ self.router = RoutingTable(self, ksize, sourceNode)
+ self.storage = storage
+ self.sourceID = sourceNode.id
+ self.log = Logger(system=self)
+",kademlia/protocol.py,"ArgSwap(idxs=1<->2 @(12,22)->(12,34))","from kademlia.log import Logger
+ class KademliaProtocol(RPCProtocol):
+ def __init__(self, sourceNode, storage, ksize):
+ RPCProtocol.__init__(self)
+ self.router = RoutingTable(self, sourceNode, ksize)
+ self.storage = storage
+ self.sourceID = sourceNode.id
+ self.log = Logger(system=self)","from kademlia.log import Logger
+ class KademliaProtocol(RPCProtocol):
+ def __init__(self, sourceNode, storage, ksize):
+ RPCProtocol.__init__(self)
+ self.router = RoutingTable(self, ksize, sourceNode)
+ self.storage = storage
+ self.sourceID = sourceNode.id
+ self.log = Logger(system=self)"
+1547,https://:@github.com/ProbonoBonobo/dash.git,765a58e651914b5f51939b5d869d1dcdc0f094f5,"@@ -49,7 +49,7 @@ class Dash(object):
+ secret_key = os.environ.get(
+ secret_key_name, SeaSurf()._generate_token()
+ )
+- os.environ[secret_key_name] = secret_key_name
++ os.environ[secret_key_name] = secret_key
+ self.server.secret_key = secret_key
+
+ if filename is not None:
+",dash/dash.py,"ReplaceText(target='secret_key' @(52,42)->(52,57))","class Dash(object):
+ secret_key = os.environ.get(
+ secret_key_name, SeaSurf()._generate_token()
+ )
+ os.environ[secret_key_name] = secret_key_name
+ self.server.secret_key = secret_key
+
+ if filename is not None:","class Dash(object):
+ secret_key = os.environ.get(
+ secret_key_name, SeaSurf()._generate_token()
+ )
+ os.environ[secret_key_name] = secret_key
+ self.server.secret_key = secret_key
+
+ if filename is not None:"
+1548,https://:@github.com/ProbonoBonobo/dash.git,84c52140b8e9f2dd7ce088ff6e78d91e9c605fe9,"@@ -185,7 +185,7 @@ class TestGenerateClasses(unittest.TestCase):
+ 'default_namespace'
+ )
+
+- generate_classes(METADATA_PATH, 'default_namespace')
++ generate_classes('default_namespace', METADATA_PATH)
+ from default_namespace.MyComponent import MyComponent \
+ as MyComponent_buildtime
+ from default_namespace.A import A as A_buildtime
+",tests/development/test_component_loader.py,"ArgSwap(idxs=0<->1 @(188,8)->(188,24))","class TestGenerateClasses(unittest.TestCase):
+ 'default_namespace'
+ )
+
+ generate_classes(METADATA_PATH, 'default_namespace')
+ from default_namespace.MyComponent import MyComponent \
+ as MyComponent_buildtime
+ from default_namespace.A import A as A_buildtime","class TestGenerateClasses(unittest.TestCase):
+ 'default_namespace'
+ )
+
+ generate_classes('default_namespace', METADATA_PATH)
+ from default_namespace.MyComponent import MyComponent \
+ as MyComponent_buildtime
+ from default_namespace.A import A as A_buildtime"
+1549,https://:@bitbucket.org/ptr-yudai/ptrlib.git,094080b5205972ee6bc845d9f29823015885f52b,"@@ -82,7 +82,7 @@ class Socket(Tube):
+ recv_size = size
+ while read_byte < size:
+ data += self.sock.recv(recv_size)
+- read_byte += len(data)
++ read_byte = len(data)
+ recv_size = size - read_byte
+ except socket.timeout:
+ dump(""recv: Timeout"", ""error"")
+",ptrlib/pwn/sock.py,"ReplaceText(target='=' @(85,26)->(85,28))","class Socket(Tube):
+ recv_size = size
+ while read_byte < size:
+ data += self.sock.recv(recv_size)
+ read_byte += len(data)
+ recv_size = size - read_byte
+ except socket.timeout:
+ dump(""recv: Timeout"", ""error"")","class Socket(Tube):
+ recv_size = size
+ while read_byte < size:
+ data += self.sock.recv(recv_size)
+ read_byte = len(data)
+ recv_size = size - read_byte
+ except socket.timeout:
+ dump(""recv: Timeout"", ""error"")"
+1550,https://:@github.com/brndnmtthws/tweet-delete.git,3ac99e2b0278b8348595d056678baa8514d6d7d3,"@@ -122,7 +122,7 @@ class Deleter:
+ # same tweets as the previous run
+ favourite_counts = []
+ retweet_counts = []
+- while len(statuses) > 0 and (last_max_id is None or last_min_id is not None or last_min_id < last_max_id):
++ while len(statuses) > 0 and (last_max_id is None or last_min_id is None or last_min_id < last_max_id):
+ statuses = self.api.GetUserTimeline(
+ include_rts=True,
+ exclude_replies=False,
+",tweet_delete/deleter.py,"ReplaceText(target=' is ' @(125,71)->(125,79))","class Deleter:
+ # same tweets as the previous run
+ favourite_counts = []
+ retweet_counts = []
+ while len(statuses) > 0 and (last_max_id is None or last_min_id is not None or last_min_id < last_max_id):
+ statuses = self.api.GetUserTimeline(
+ include_rts=True,
+ exclude_replies=False,","class Deleter:
+ # same tweets as the previous run
+ favourite_counts = []
+ retweet_counts = []
+ while len(statuses) > 0 and (last_max_id is None or last_min_id is None or last_min_id < last_max_id):
+ statuses = self.api.GetUserTimeline(
+ include_rts=True,
+ exclude_replies=False,"
+1551,https://:@github.com/fantasticfears/kgegrok.git,cc7f0c2a3ed727b7f2cc656c6205be6e08be9f23,"@@ -15,7 +15,7 @@ def _evaluate_predict_element(model, triple_index, num_expands, element_type, ra
+ logging.debug(element_type)
+ logging.debug(""Batch len: "" + str(len(batch)) + ""; batch sample: "" + str(batch[0]))
+ predicted_batch = model.forward(batch).cpu()
+- logging.debug(""Predicted batch len"" + str(len(batch)) + ""; batch sample: "" + str(predicted_batch[0]))
++ logging.debug(""Predicted batch len"" + str(len(predicted_batch)) + ""; batch sample: "" + str(predicted_batch[0]))
+ rank, filtered_rank = rank_fn(predicted_batch.data.numpy(), triple_index)
+ logging.debug(""Rank :"" + str(rank) + ""; Filtered rank length :"" + str(filtered_rank))
+ ranks_list.append(rank)
+",estimate.py,"ReplaceText(target='predicted_batch' @(18,50)->(18,55))","def _evaluate_predict_element(model, triple_index, num_expands, element_type, ra
+ logging.debug(element_type)
+ logging.debug(""Batch len: "" + str(len(batch)) + ""; batch sample: "" + str(batch[0]))
+ predicted_batch = model.forward(batch).cpu()
+ logging.debug(""Predicted batch len"" + str(len(batch)) + ""; batch sample: "" + str(predicted_batch[0]))
+ rank, filtered_rank = rank_fn(predicted_batch.data.numpy(), triple_index)
+ logging.debug(""Rank :"" + str(rank) + ""; Filtered rank length :"" + str(filtered_rank))
+ ranks_list.append(rank)","def _evaluate_predict_element(model, triple_index, num_expands, element_type, ra
+ logging.debug(element_type)
+ logging.debug(""Batch len: "" + str(len(batch)) + ""; batch sample: "" + str(batch[0]))
+ predicted_batch = model.forward(batch).cpu()
+ logging.debug(""Predicted batch len"" + str(len(predicted_batch)) + ""; batch sample: "" + str(predicted_batch[0]))
+ rank, filtered_rank = rank_fn(predicted_batch.data.numpy(), triple_index)
+ logging.debug(""Rank :"" + str(rank) + ""; Filtered rank length :"" + str(filtered_rank))
+ ranks_list.append(rank)"
+1552,https://:@github.com/fantasticfears/kgegrok.git,9e6c504d07c0faaebf7f5f4ec46509ba0c71622c,"@@ -122,7 +122,7 @@ def train_and_validate(triple_source,
+ stats.report_prediction_result(
+ config, result, epoch=i_epoch, drawer=drawer)
+
+- if config.save_per_epoch != 0 and i_epoch % config.save_per_epoch:
++ if config.save_per_epoch > 0 and i_epoch % config.save_per_epoch:
+ save_checkpoint({
+ 'epoch': i_epoch,
+ 'state_dict': model.state_dict(),
+",kgexpr/estimate.py,"ReplaceText(target='>' @(125,33)->(125,35))","def train_and_validate(triple_source,
+ stats.report_prediction_result(
+ config, result, epoch=i_epoch, drawer=drawer)
+
+ if config.save_per_epoch != 0 and i_epoch % config.save_per_epoch:
+ save_checkpoint({
+ 'epoch': i_epoch,
+ 'state_dict': model.state_dict(),","def train_and_validate(triple_source,
+ stats.report_prediction_result(
+ config, result, epoch=i_epoch, drawer=drawer)
+
+ if config.save_per_epoch > 0 and i_epoch % config.save_per_epoch:
+ save_checkpoint({
+ 'epoch': i_epoch,
+ 'state_dict': model.state_dict(),"
+1553,https://:@github.com/klem4/panacea.git,feef5bb935bd8fb1626dbf9670a24ed858133473,"@@ -39,7 +39,7 @@ def cache_thing(model, cache_key, data, cond_dnf=[[]], timeout=None):
+
+ # Write data to cache
+ if timeout is not None:
+- txn.setex(cache_key, data, timeout)
++ txn.setex(cache_key, timeout, data)
+ else:
+ txn.set(cache_key, data)
+
+",panacea/tools.py,"ArgSwap(idxs=1<->2 @(42,8)->(42,17))","def cache_thing(model, cache_key, data, cond_dnf=[[]], timeout=None):
+
+ # Write data to cache
+ if timeout is not None:
+ txn.setex(cache_key, data, timeout)
+ else:
+ txn.set(cache_key, data)
+ ","def cache_thing(model, cache_key, data, cond_dnf=[[]], timeout=None):
+
+ # Write data to cache
+ if timeout is not None:
+ txn.setex(cache_key, timeout, data)
+ else:
+ txn.set(cache_key, data)
+ "
+1554,https://:@github.com/mrk-its/s3fs.git,b5a5e712b40da1938760fce0095a9f9d99a436fc,"@@ -23,7 +23,7 @@ class S3FSOpener(Opener):
+ strict = (
+ parse_result.params[""strict""] == ""1""
+ if ""strict"" in parse_result.params
+- else True
++ else False
+ )
+ s3fs = S3FS(
+ bucket_name,
+",fs_s3fs/opener.py,"ReplaceText(target='False' @(26,17)->(26,21))","class S3FSOpener(Opener):
+ strict = (
+ parse_result.params[""strict""] == ""1""
+ if ""strict"" in parse_result.params
+ else True
+ )
+ s3fs = S3FS(
+ bucket_name,","class S3FSOpener(Opener):
+ strict = (
+ parse_result.params[""strict""] == ""1""
+ if ""strict"" in parse_result.params
+ else False
+ )
+ s3fs = S3FS(
+ bucket_name,"
+1555,https://:@github.com/python-trio/asyncclick.git,336e5e08acf98a4033e5aa4c6fcef118d4f469ec,"@@ -224,7 +224,7 @@ def version_option(version=None, *param_decls, **attrs):
+ message = attrs.pop('message', '%(prog)s, version %(version)s')
+
+ def callback(ctx, param, value):
+- if value or ctx.resilient_parsing:
++ if not value or ctx.resilient_parsing:
+ return
+ prog = prog_name
+ if prog is None:
+",click/decorators.py,"ReplaceText(target='not ' @(227,15)->(227,15))","def version_option(version=None, *param_decls, **attrs):
+ message = attrs.pop('message', '%(prog)s, version %(version)s')
+
+ def callback(ctx, param, value):
+ if value or ctx.resilient_parsing:
+ return
+ prog = prog_name
+ if prog is None:","def version_option(version=None, *param_decls, **attrs):
+ message = attrs.pop('message', '%(prog)s, version %(version)s')
+
+ def callback(ctx, param, value):
+ if not value or ctx.resilient_parsing:
+ return
+ prog = prog_name
+ if prog is None:"
+1556,https://:@github.com/python-trio/asyncclick.git,598c6d76fbc036fb3219d9f09948a682cda66601,"@@ -213,7 +213,7 @@ class CliRunner(object):
+ old_env = {}
+ try:
+ for key, value in iteritems(env):
+- old_env[key] = os.environ.get(value)
++ old_env[key] = os.environ.get(key)
+ if value is None:
+ try:
+ del os.environ[key]
+",click/testing.py,"ReplaceText(target='key' @(216,46)->(216,51))","class CliRunner(object):
+ old_env = {}
+ try:
+ for key, value in iteritems(env):
+ old_env[key] = os.environ.get(value)
+ if value is None:
+ try:
+ del os.environ[key]","class CliRunner(object):
+ old_env = {}
+ try:
+ for key, value in iteritems(env):
+ old_env[key] = os.environ.get(key)
+ if value is None:
+ try:
+ del os.environ[key]"
+1557,https://:@github.com/KonstantinTogoi/aiomailru.git,d506e10c260e749ff986a9acfa939016faf683e8,"@@ -94,7 +94,7 @@ class TokenSession(PublicSession):
+
+ for cookie in cookies:
+ loose_cookie = Cookie.to_morsel(cookie)
+- loose_cookies.append((loose_cookies.key, loose_cookie))
++ loose_cookies.append((loose_cookie.key, loose_cookie))
+
+ self.session.cookie_jar.update_cookies(loose_cookies)
+
+",aiomailru/sessions.py,"ReplaceText(target='loose_cookie' @(97,34)->(97,47))","class TokenSession(PublicSession):
+
+ for cookie in cookies:
+ loose_cookie = Cookie.to_morsel(cookie)
+ loose_cookies.append((loose_cookies.key, loose_cookie))
+
+ self.session.cookie_jar.update_cookies(loose_cookies)
+ ","class TokenSession(PublicSession):
+
+ for cookie in cookies:
+ loose_cookie = Cookie.to_morsel(cookie)
+ loose_cookies.append((loose_cookie.key, loose_cookie))
+
+ self.session.cookie_jar.update_cookies(loose_cookies)
+ "
+1558,https://:@github.com/muma378/moose.git,7068cc3a5636a5bebd005af13e601e5a6bddeefd,"@@ -101,7 +101,7 @@ class ConfigLoader(object):
+ content = self.__update_with_locales(raw_content)
+ except UnicodeError as e:
+ result = chardet.detect(raw_content)
+- if not result and result['encoding'] in ['ascii', settings.FILE_CHARSET]:
++ if not result or result['encoding'] in ['ascii', settings.FILE_CHARSET]:
+ # Tried, but failed
+ raise ImproperlyConfigured(
+ ""Unknown encoding for '%s'."" % self.path)
+",moose/core/configs/loader.py,"ReplaceText(target='or' @(104,18)->(104,21))","class ConfigLoader(object):
+ content = self.__update_with_locales(raw_content)
+ except UnicodeError as e:
+ result = chardet.detect(raw_content)
+ if not result and result['encoding'] in ['ascii', settings.FILE_CHARSET]:
+ # Tried, but failed
+ raise ImproperlyConfigured(
+ ""Unknown encoding for '%s'."" % self.path)","class ConfigLoader(object):
+ content = self.__update_with_locales(raw_content)
+ except UnicodeError as e:
+ result = chardet.detect(raw_content)
+ if not result or result['encoding'] in ['ascii', settings.FILE_CHARSET]:
+ # Tried, but failed
+ raise ImproperlyConfigured(
+ ""Unknown encoding for '%s'."" % self.path)"
+1559,https://:@github.com/S1M0N38/aao.git,77ed1c21e6f2f4b0e51620aa044ef2192998938f,"@@ -161,7 +161,7 @@ class Soccer(Spider888sport):
+ value = [''] + value
+ try:
+ yes, no = float(value[7]), float(value[9])
+- odds[i]['both_teams_to_score'] = {'yes': no, 'no': no}
++ odds[i]['both_teams_to_score'] = {'yes': yes, 'no': no}
+ except IndexError:
+ pass
+ self.log.debug(' * got both teams to score odds')
+",aao/spiders/spider_888sport.py,"ReplaceText(target='yes' @(164,57)->(164,59))","class Soccer(Spider888sport):
+ value = [''] + value
+ try:
+ yes, no = float(value[7]), float(value[9])
+ odds[i]['both_teams_to_score'] = {'yes': no, 'no': no}
+ except IndexError:
+ pass
+ self.log.debug(' * got both teams to score odds')","class Soccer(Spider888sport):
+ value = [''] + value
+ try:
+ yes, no = float(value[7]), float(value[9])
+ odds[i]['both_teams_to_score'] = {'yes': yes, 'no': no}
+ except IndexError:
+ pass
+ self.log.debug(' * got both teams to score odds')"
+1560,https://:@github.com/silvacms/silva.ui.git,8012cc5c85765254d22d4313db35fcb71e98b10d,"@@ -75,7 +75,7 @@ class ContentSerializer(object):
+ formatter = locale.dates.getFormatter('dateTime', 'short')
+ self.format_date = lambda d: formatter.format(d.asdatetime())
+ self.format_author = lambda a: a.userid()
+- if not getUtility(IMemberService).get_display_usernames():
++ if getUtility(IMemberService).get_display_usernames():
+ self.format_author = lambda a: a.fullname()
+
+ def get_access(self, content):
+",src/silva/ui/rest/container/serializer.py,"ReplaceText(target='' @(78,11)->(78,15))","class ContentSerializer(object):
+ formatter = locale.dates.getFormatter('dateTime', 'short')
+ self.format_date = lambda d: formatter.format(d.asdatetime())
+ self.format_author = lambda a: a.userid()
+ if not getUtility(IMemberService).get_display_usernames():
+ self.format_author = lambda a: a.fullname()
+
+ def get_access(self, content):","class ContentSerializer(object):
+ formatter = locale.dates.getFormatter('dateTime', 'short')
+ self.format_date = lambda d: formatter.format(d.asdatetime())
+ self.format_author = lambda a: a.userid()
+ if getUtility(IMemberService).get_display_usernames():
+ self.format_author = lambda a: a.fullname()
+
+ def get_access(self, content):"
+1561,https://:@github.com/sglumac/pyislands.git,d76a611240c3b2cc9b5a6cef7f503feb0919e314,"@@ -39,7 +39,7 @@ def policy_2tournament(population, immigrants):
+ new_population = list(population)
+
+ for immigrant in immigrants:
+- _, idxs = ktournament(population, 2)
++ _, idxs = ktournament(2, population)
+ bad_idx = idxs[1]
+
+ new_population[bad_idx] = immigrant
+",pyislands/archipelago/immigration.py,"ArgSwap(idxs=0<->1 @(42,18)->(42,29))","def policy_2tournament(population, immigrants):
+ new_population = list(population)
+
+ for immigrant in immigrants:
+ _, idxs = ktournament(population, 2)
+ bad_idx = idxs[1]
+
+ new_population[bad_idx] = immigrant","def policy_2tournament(population, immigrants):
+ new_population = list(population)
+
+ for immigrant in immigrants:
+ _, idxs = ktournament(2, population)
+ bad_idx = idxs[1]
+
+ new_population[bad_idx] = immigrant"
+1562,https://:@github.com/AmyOlex/Chrono.git,91f5ba63a7825e0b85b5b69b6d32a2336d5142ba,"@@ -264,7 +264,7 @@ def hasPartOfDay(text):
+ #convert to all lower
+ text_lower = text.lower()
+ #remove all punctuation
+- text_norm = text.translate(str.maketrans(string.punctuation, "" ""*len(string.punctuation))).strip()
++ text_norm = text_lower.translate(str.maketrans(string.punctuation, "" ""*len(string.punctuation))).strip()
+ #convert to list
+ text_list = text_norm.split("" "")
+
+",Chrono/temporalTest.py,"ReplaceText(target='text_lower' @(267,16)->(267,20))","def hasPartOfDay(text):
+ #convert to all lower
+ text_lower = text.lower()
+ #remove all punctuation
+ text_norm = text.translate(str.maketrans(string.punctuation, "" ""*len(string.punctuation))).strip()
+ #convert to list
+ text_list = text_norm.split("" "")
+ ","def hasPartOfDay(text):
+ #convert to all lower
+ text_lower = text.lower()
+ #remove all punctuation
+ text_norm = text_lower.translate(str.maketrans(string.punctuation, "" ""*len(string.punctuation))).strip()
+ #convert to list
+ text_list = text_norm.split("" "")
+ "
+1563,https://:@bitbucket.org/bgframework/bglogs.git,20a9bb781132eaecf084c6998056e7c07c7a5df8,"@@ -81,7 +81,7 @@ def configure(_name=None, debug=False, conf=None):
+ default_conf['loggers'][logger.name] = {
+ 'level': logging.DEBUG if debug else logging.INFO
+ }
+- if conf is not None:
++ if conf is None:
+ conf_ = default_conf
+ else:
+ conf_ = copy.deepcopy(default_conf)
+",bglogs/configuration.py,"ReplaceText(target=' is ' @(84,11)->(84,19))","def configure(_name=None, debug=False, conf=None):
+ default_conf['loggers'][logger.name] = {
+ 'level': logging.DEBUG if debug else logging.INFO
+ }
+ if conf is not None:
+ conf_ = default_conf
+ else:
+ conf_ = copy.deepcopy(default_conf)","def configure(_name=None, debug=False, conf=None):
+ default_conf['loggers'][logger.name] = {
+ 'level': logging.DEBUG if debug else logging.INFO
+ }
+ if conf is None:
+ conf_ = default_conf
+ else:
+ conf_ = copy.deepcopy(default_conf)"
+1564,https://:@github.com/QuailTeam/Quail.git,4903f493bef0f297a8209f6eb4f603710396dd79,"@@ -34,7 +34,7 @@ def run(solution, installer, builder=Builder()):
+ elif args.quail_uninstall:
+ manager.uninstall()
+ else:
+- if installer.is_installed():
++ if manager.is_installed():
+ manager.run()
+ else:
+ manager.install()
+",quail/run.py,"ReplaceText(target='manager' @(37,11)->(37,20))","def run(solution, installer, builder=Builder()):
+ elif args.quail_uninstall:
+ manager.uninstall()
+ else:
+ if installer.is_installed():
+ manager.run()
+ else:
+ manager.install()","def run(solution, installer, builder=Builder()):
+ elif args.quail_uninstall:
+ manager.uninstall()
+ else:
+ if manager.is_installed():
+ manager.run()
+ else:
+ manager.install()"
+1565,https://:@github.com/QuailTeam/Quail.git,5b1ac96b6b0d1707b1cd7cb5c85a222e8b782292,"@@ -20,7 +20,7 @@ def _validate_side_img(path):
+ logger.warn(""Side image not valid: height should be 250px"")
+ return False
+
+- if width <= 250:
++ if width > 250:
+ logger.warn(""Side image not valid: width should be <= 250px"")
+ return False
+ else:
+",iquail/validate/validate.py,"ReplaceText(target='>' @(23,21)->(23,23))","def _validate_side_img(path):
+ logger.warn(""Side image not valid: height should be 250px"")
+ return False
+
+ if width <= 250:
+ logger.warn(""Side image not valid: width should be <= 250px"")
+ return False
+ else:","def _validate_side_img(path):
+ logger.warn(""Side image not valid: height should be 250px"")
+ return False
+
+ if width > 250:
+ logger.warn(""Side image not valid: width should be <= 250px"")
+ return False
+ else:"
+1566,https://:@github.com/davidhalter/depl.git,518ab778c71bbfa5d9038d623e6c658222279160,"@@ -70,7 +70,7 @@ class Config(object):
+ for key, value in current.items():
+ if key not in grammar:
+ raise ValidationError(""Key %s is not in grammar."" % key)
+- result[key] = self._validate_detail(element, grammar[key])
++ result[key] = self._validate_detail(value, grammar[key])
+ else:
+ # normal type
+ if type(grammar) != type(current):
+",depl/config.py,"ReplaceText(target='value' @(73,52)->(73,59))","class Config(object):
+ for key, value in current.items():
+ if key not in grammar:
+ raise ValidationError(""Key %s is not in grammar."" % key)
+ result[key] = self._validate_detail(element, grammar[key])
+ else:
+ # normal type
+ if type(grammar) != type(current):","class Config(object):
+ for key, value in current.items():
+ if key not in grammar:
+ raise ValidationError(""Key %s is not in grammar."" % key)
+ result[key] = self._validate_detail(value, grammar[key])
+ else:
+ # normal type
+ if type(grammar) != type(current):"
+1567,https://:@github.com/davidhalter/depl.git,b74ad2d1308a0af5eae349f79aa87661f222621a,"@@ -20,7 +20,7 @@ def load(name, settings):
+ module_dependencies, commands = module.load(settings, _Package.system())
+
+ for dep in module_dependencies:
+- dep_name = dependencies[name][_Package.system()]
++ dep_name = dependencies[dep][_Package.system()]
+ yield 'sudo %s %s' % (_Package.install(), dep_name)
+ for cmd in commands:
+ yield cmd
+",depl/deploy/__init__.py,"ReplaceText(target='dep' @(23,32)->(23,36))","def load(name, settings):
+ module_dependencies, commands = module.load(settings, _Package.system())
+
+ for dep in module_dependencies:
+ dep_name = dependencies[name][_Package.system()]
+ yield 'sudo %s %s' % (_Package.install(), dep_name)
+ for cmd in commands:
+ yield cmd","def load(name, settings):
+ module_dependencies, commands = module.load(settings, _Package.system())
+
+ for dep in module_dependencies:
+ dep_name = dependencies[dep][_Package.system()]
+ yield 'sudo %s %s' % (_Package.install(), dep_name)
+ for cmd in commands:
+ yield cmd"
+1568,https://:@github.com/nukesor/gitalizer.git,1b778e4064198676069d1a339a2f1faf97aad2c0,"@@ -82,7 +82,7 @@ class Repository(db.Model):
+ If that is the case, we want to skip it.
+ """"""
+ timeout_threshold = datetime.utcnow() - current_app.config['REPOSITORY_RESCAN_TIMEOUT']
+- up_to_date = self.completely_scanned and self.updated_at <= timeout_threshold
++ up_to_date = self.completely_scanned and self.updated_at >= timeout_threshold
+
+ if self.fork or self.broken or up_to_date:
+ return False
+",gitalizer/models/repository.py,"ReplaceText(target='>=' @(85,65)->(85,67))","class Repository(db.Model):
+ If that is the case, we want to skip it.
+ """"""
+ timeout_threshold = datetime.utcnow() - current_app.config['REPOSITORY_RESCAN_TIMEOUT']
+ up_to_date = self.completely_scanned and self.updated_at <= timeout_threshold
+
+ if self.fork or self.broken or up_to_date:
+ return False","class Repository(db.Model):
+ If that is the case, we want to skip it.
+ """"""
+ timeout_threshold = datetime.utcnow() - current_app.config['REPOSITORY_RESCAN_TIMEOUT']
+ up_to_date = self.completely_scanned and self.updated_at >= timeout_threshold
+
+ if self.fork or self.broken or up_to_date:
+ return False"
+1569,https://:@github.com/qualinext/ionosphere.git,1a1ec05ce9fb48dfbb0362aebbb779e8ba92f3f6,"@@ -372,7 +372,7 @@ class Template(object):
+ if isinstance(values, list):
+ for v in values:
+ if v.title in d:
+- self.handle_duplicate_key(values.title)
++ self.handle_duplicate_key(v.title)
+ d[v.title] = v
+ else:
+ if values.title in d:
+",troposphere/__init__.py,"ReplaceText(target='v' @(375,46)->(375,52))","class Template(object):
+ if isinstance(values, list):
+ for v in values:
+ if v.title in d:
+ self.handle_duplicate_key(values.title)
+ d[v.title] = v
+ else:
+ if values.title in d:","class Template(object):
+ if isinstance(values, list):
+ for v in values:
+ if v.title in d:
+ self.handle_duplicate_key(v.title)
+ d[v.title] = v
+ else:
+ if values.title in d:"
+1570,https://:@github.com/natcap/ecoshard.git,ef72a3898ccc18018f1d048211b681edb7cd29ab,"@@ -60,7 +60,7 @@ def hash_file(
+ prefix = match_result.group(1)
+
+ LOGGER.debug('calculating hash for %s', base_path)
+- hash_val = calculate_hash(base_filename, hash_algorithm)
++ hash_val = calculate_hash(base_path, hash_algorithm)
+
+ if target_dir is None:
+ target_dir = os.path.dirname(base_path)
+",src/ecoshard/ecoshard.py,"ReplaceText(target='base_path' @(63,30)->(63,43))","def hash_file(
+ prefix = match_result.group(1)
+
+ LOGGER.debug('calculating hash for %s', base_path)
+ hash_val = calculate_hash(base_filename, hash_algorithm)
+
+ if target_dir is None:
+ target_dir = os.path.dirname(base_path)","def hash_file(
+ prefix = match_result.group(1)
+
+ LOGGER.debug('calculating hash for %s', base_path)
+ hash_val = calculate_hash(base_path, hash_algorithm)
+
+ if target_dir is None:
+ target_dir = os.path.dirname(base_path)"
+1571,https://:@github.com/natcap/ecoshard.git,ddb17b5c75dc78ac1f0687b12d0ca0d3c1c42ff7,"@@ -37,7 +37,7 @@ def main():
+ payload = {
+ ""style"": {
+ ""name"": style_name,
+- ""filename"": style_path
++ ""filename"": filepath
+ }
+ }
+ LOGGER.debug(payload)
+",load_to_geoserver.py,"ReplaceText(target='filepath' @(40,24)->(40,34))","def main():
+ payload = {
+ ""style"": {
+ ""name"": style_name,
+ ""filename"": style_path
+ }
+ }
+ LOGGER.debug(payload)","def main():
+ payload = {
+ ""style"": {
+ ""name"": style_name,
+ ""filename"": filepath
+ }
+ }
+ LOGGER.debug(payload)"
+1572,https://:@github.com/startling/argent.git,5353bc7b29abd2e0d2a1307496c84287becdb326,"@@ -40,7 +40,7 @@ class Argument(object):
+ # `self.name` is what we get but with no underscores and all dashes.
+ self.name = name.replace(""_"", ""-"")
+ # `self.underscored` is the opposite.
+- self.underscored = name.replace(""_"", ""-"")
++ self.underscored = name.replace(""-"", ""_"")
+ # this is the default value; can be None if there isn't one.
+ self.default = default
+ # if the name starts with an underscore or dash, it's a flag,
+",argent/arguments.py,"ArgSwap(idxs=0<->1 @(43,27)->(43,39))","class Argument(object):
+ # `self.name` is what we get but with no underscores and all dashes.
+ self.name = name.replace(""_"", ""-"")
+ # `self.underscored` is the opposite.
+ self.underscored = name.replace(""_"", ""-"")
+ # this is the default value; can be None if there isn't one.
+ self.default = default
+ # if the name starts with an underscore or dash, it's a flag,","class Argument(object):
+ # `self.name` is what we get but with no underscores and all dashes.
+ self.name = name.replace(""_"", ""-"")
+ # `self.underscored` is the opposite.
+ self.underscored = name.replace(""-"", ""_"")
+ # this is the default value; can be None if there isn't one.
+ self.default = default
+ # if the name starts with an underscore or dash, it's a flag,"
+1573,https://:@github.com/joakimskoog/anapioficeandfire-python.git,da65bed5110c34f62c872f55f1ffb09326940a63,"@@ -4,7 +4,7 @@
+ class AnApiOfIceAndFireError(Exception):
+
+ def __init__(self, reason, response=None):
+- self.reason = response
++ self.reason = reason
+ self.response = response
+ Exception.__init__(self, reason)
+
+",anapioficeandfire/error.py,"ReplaceText(target='reason' @(7,22)->(7,30))","-4,7 +4,7 @@
+ class AnApiOfIceAndFireError(Exception):
+
+ def __init__(self, reason, response=None):
+ self.reason = response
+ self.response = response
+ Exception.__init__(self, reason)
+ ","-4,7 +4,7 @@
+ class AnApiOfIceAndFireError(Exception):
+
+ def __init__(self, reason, response=None):
+ self.reason = reason
+ self.response = response
+ Exception.__init__(self, reason)
+ "
+1574,https://:@github.com/prologic/udns.git,80988bc30391f48cd9189623043db516c0217a5a,"@@ -244,7 +244,7 @@ class Server(Component):
+ )
+ )
+
+- lookup = DNSRecord(q=DNSQuestion(qname, qclass, qtype))
++ lookup = DNSRecord(q=DNSQuestion(qname, qtype, qclass))
+ id = lookup.header.id
+ self.peers[id] = peer
+ self.requests[id] = request
+",udns/server.py,"ArgSwap(idxs=1<->2 @(247,29)->(247,40))","class Server(Component):
+ )
+ )
+
+ lookup = DNSRecord(q=DNSQuestion(qname, qclass, qtype))
+ id = lookup.header.id
+ self.peers[id] = peer
+ self.requests[id] = request","class Server(Component):
+ )
+ )
+
+ lookup = DNSRecord(q=DNSQuestion(qname, qtype, qclass))
+ id = lookup.header.id
+ self.peers[id] = peer
+ self.requests[id] = request"
+1575,https://:@github.com/ShadauxCat/csbuild.git,53b88d8dbcb6c14ed2d5155d8312142e3c1db9ff,"@@ -72,7 +72,7 @@ class project_generator_qtcreator( project_generator.project_generator ):
+ # These values don't matter much as they're likely to be the same (or close enough to the same for our purposes)
+ # across all targets.
+ archDict = projectDict[list(projectDict.keys())[0]]
+- toolchainDict = projectDict[list(archDict.keys())[0]]
++ toolchainDict = archDict[list(archDict.keys())[0]]
+ project = toolchainDict[list(toolchainDict.keys())[0]]
+
+ projectpath = os.path.join( self.rootpath, parentPath, project.name )
+",csbuild/project_generator_qtcreator.py,"ReplaceText(target='archDict' @(75,18)->(75,29))","class project_generator_qtcreator( project_generator.project_generator ):
+ # These values don't matter much as they're likely to be the same (or close enough to the same for our purposes)
+ # across all targets.
+ archDict = projectDict[list(projectDict.keys())[0]]
+ toolchainDict = projectDict[list(archDict.keys())[0]]
+ project = toolchainDict[list(toolchainDict.keys())[0]]
+
+ projectpath = os.path.join( self.rootpath, parentPath, project.name )","class project_generator_qtcreator( project_generator.project_generator ):
+ # These values don't matter much as they're likely to be the same (or close enough to the same for our purposes)
+ # across all targets.
+ archDict = projectDict[list(projectDict.keys())[0]]
+ toolchainDict = archDict[list(archDict.keys())[0]]
+ project = toolchainDict[list(toolchainDict.keys())[0]]
+
+ projectpath = os.path.join( self.rootpath, parentPath, project.name )"
+1576,https://:@github.com/Ciaran1981/geospatial-learn.git,9c5a1d76e1eff22ec986f2bb6bbf2d4bb8337033,"@@ -1655,7 +1655,7 @@ def multi_temp_filter(inRas, outRas, bands=None, windowSize=None):
+ if bands==None:
+ bands = inDataset.RasterCount
+
+- outDataset = _copy_dataset_config(inRas, outMap = outRas,
++ outDataset = _copy_dataset_config(inDataset, outMap = outRas,
+ bands = bands)
+
+
+",geospatial_learn/geodata.py,"ReplaceText(target='inDataset' @(1658,38)->(1658,43))","def multi_temp_filter(inRas, outRas, bands=None, windowSize=None):
+ if bands==None:
+ bands = inDataset.RasterCount
+
+ outDataset = _copy_dataset_config(inRas, outMap = outRas,
+ bands = bands)
+
+ ","def multi_temp_filter(inRas, outRas, bands=None, windowSize=None):
+ if bands==None:
+ bands = inDataset.RasterCount
+
+ outDataset = _copy_dataset_config(inDataset, outMap = outRas,
+ bands = bands)
+
+ "
+1577,https://:@github.com/oslandia/geo3dfeatures.git,0ee727feb8ba02991c6546783c6d786ae1e63563,"@@ -195,7 +195,7 @@ def save_clusters(
+ io.write_xyz(results, output_file_path)
+ else:
+ input_file_path = Path(datapath, ""input"", experiment + "".las"")
+- io.write_las(results, output_file_path, input_file_path)
++ io.write_las(results, input_file_path, output_file_path)
+ logger.info(""Clusters saved into %s"", output_file_path)
+
+
+",geo3dfeatures/tools/kmean.py,"ArgSwap(idxs=1<->2 @(198,8)->(198,20))","def save_clusters(
+ io.write_xyz(results, output_file_path)
+ else:
+ input_file_path = Path(datapath, ""input"", experiment + "".las"")
+ io.write_las(results, output_file_path, input_file_path)
+ logger.info(""Clusters saved into %s"", output_file_path)
+
+ ","def save_clusters(
+ io.write_xyz(results, output_file_path)
+ else:
+ input_file_path = Path(datapath, ""input"", experiment + "".las"")
+ io.write_las(results, input_file_path, output_file_path)
+ logger.info(""Clusters saved into %s"", output_file_path)
+
+ "
+1578,https://:@github.com/MBravoS/splot.git,f469d20ba0500925408bd33e90ac3ec2a2a9046d,"@@ -237,7 +237,7 @@ def scat(x,y,xlim=None,ylim=None,xinvert=False,yinvert=False,cbar_invert=False,x
+ cbar.set_label(clabel)
+ if cbar_invert:
+ cbar.ax.invert_yaxis()
+- if plot_par[0] is not None:
++ if plabel[0] is not None:
+ plt.legend(loc=lab_loc)
+ if not multi:
+ plot_finalizer(xlog,ylog,xlim,ylim,title,xlabel,ylabel,xinvert,yinvert)
+",splotch/plots_2d.py,"ReplaceText(target='plabel' @(240,4)->(240,12))","def scat(x,y,xlim=None,ylim=None,xinvert=False,yinvert=False,cbar_invert=False,x
+ cbar.set_label(clabel)
+ if cbar_invert:
+ cbar.ax.invert_yaxis()
+ if plot_par[0] is not None:
+ plt.legend(loc=lab_loc)
+ if not multi:
+ plot_finalizer(xlog,ylog,xlim,ylim,title,xlabel,ylabel,xinvert,yinvert)","def scat(x,y,xlim=None,ylim=None,xinvert=False,yinvert=False,cbar_invert=False,x
+ cbar.set_label(clabel)
+ if cbar_invert:
+ cbar.ax.invert_yaxis()
+ if plabel[0] is not None:
+ plt.legend(loc=lab_loc)
+ if not multi:
+ plot_finalizer(xlog,ylog,xlim,ylim,title,xlabel,ylabel,xinvert,yinvert)"
+1579,https://:@github.com/MBravoS/splot.git,6a56f84589b416b32e5344de94dc23d4c8ea08e2,"@@ -603,7 +603,7 @@ def cornerplot(data,columns=None,pair_type='contour',nsamples=None,sample_type='
+ if (jj == 0 and ii != 0):
+ axes[ii,jj].set_ylabel(labels[ii])
+ if (len(pair_type) == 2 and jj == npar-1 and ii != npar-1):
+- axes[ii,jj].set_ylabel(labels[jj])
++ axes[ii,jj].set_ylabel(labels[ii])
+ axes[ii,jj].yaxis.tick_right()
+ axes[ii,jj].yaxis.set_label_position('right')
+
+",src/splotch/axis_func.py,"ReplaceText(target='ii' @(606,35)->(606,37))","def cornerplot(data,columns=None,pair_type='contour',nsamples=None,sample_type='
+ if (jj == 0 and ii != 0):
+ axes[ii,jj].set_ylabel(labels[ii])
+ if (len(pair_type) == 2 and jj == npar-1 and ii != npar-1):
+ axes[ii,jj].set_ylabel(labels[jj])
+ axes[ii,jj].yaxis.tick_right()
+ axes[ii,jj].yaxis.set_label_position('right')
+ ","def cornerplot(data,columns=None,pair_type='contour',nsamples=None,sample_type='
+ if (jj == 0 and ii != 0):
+ axes[ii,jj].set_ylabel(labels[ii])
+ if (len(pair_type) == 2 and jj == npar-1 and ii != npar-1):
+ axes[ii,jj].set_ylabel(labels[ii])
+ axes[ii,jj].yaxis.tick_right()
+ axes[ii,jj].yaxis.set_label_position('right')
+ "
+1580,https://:@github.com/GiulioRossetti/ANGEL.git,a04ff79e2e3625c49aebcdf4143aa62422e70172,"@@ -94,7 +94,7 @@ class ArchAngel(object):
+ edge_list = []
+
+ self.slices_ids.append(actual_slice)
+- yield g, actual_slice
++ yield g, previous_slice
+
+ previous_slice = actual_slice
+
+",angel/alg/iArchAngel.py,"ReplaceText(target='previous_slice' @(97,29)->(97,41))","class ArchAngel(object):
+ edge_list = []
+
+ self.slices_ids.append(actual_slice)
+ yield g, actual_slice
+
+ previous_slice = actual_slice
+ ","class ArchAngel(object):
+ edge_list = []
+
+ self.slices_ids.append(actual_slice)
+ yield g, previous_slice
+
+ previous_slice = actual_slice
+ "
+1581,https://:@github.com/tdi/pyPEPA.git,98934ecf6c42e589938e607e1b075395b37586df,"@@ -55,7 +55,7 @@ def range_maker(low, hi, step):
+ nonlocal hi
+ nonlocal step
+ cur = low
+- while cur < hi:
++ while cur <= hi:
+ yield cur
+ cur += step
+ return counter
+",pyPEPA/experiments/experiment.py,"ReplaceText(target='<=' @(58,18)->(58,19))","def range_maker(low, hi, step):
+ nonlocal hi
+ nonlocal step
+ cur = low
+ while cur < hi:
+ yield cur
+ cur += step
+ return counter","def range_maker(low, hi, step):
+ nonlocal hi
+ nonlocal step
+ cur = low
+ while cur <= hi:
+ yield cur
+ cur += step
+ return counter"
+1582,https://:@github.com/hellupline/flask-crud.git,1760827b285ba24f20e111e8d8146e3514ca2c96,"@@ -20,7 +20,7 @@ class Tree:
+ if items is not None:
+ self.register_items(items)
+
+- if url is not None:
++ if url is None:
+ self.url = slugify(name)
+ else:
+ self.url = url
+",flask_crud/tree.py,"ReplaceText(target=' is ' @(23,14)->(23,22))","class Tree:
+ if items is not None:
+ self.register_items(items)
+
+ if url is not None:
+ self.url = slugify(name)
+ else:
+ self.url = url","class Tree:
+ if items is not None:
+ self.register_items(items)
+
+ if url is None:
+ self.url = slugify(name)
+ else:
+ self.url = url"
+1583,https://:@github.com/IMTMarburg/pypipegraph.git,6a69a16a320e712e114af10cc578be7737e3a620,"@@ -173,7 +173,7 @@ if PY3:
+ def reraise(tp, value, tb=None):
+ if tb:
+ raise tp.with_traceback(tb)
+- raise value
++ raise tp
+ else:
+ def exec_(code, globs=None, locs=None):
+ """"""Execute code in a namespace.""""""
+",pypipegraph/util.py,"ReplaceText(target='tp' @(176,14)->(176,19))","if PY3:
+ def reraise(tp, value, tb=None):
+ if tb:
+ raise tp.with_traceback(tb)
+ raise value
+ else:
+ def exec_(code, globs=None, locs=None):
+ """"""Execute code in a namespace.""""""","if PY3:
+ def reraise(tp, value, tb=None):
+ if tb:
+ raise tp.with_traceback(tb)
+ raise tp
+ else:
+ def exec_(code, globs=None, locs=None):
+ """"""Execute code in a namespace."""""""
+1584,https://:@github.com/IMTMarburg/pypipegraph.git,d4e04e455117994041e921742ee1599931a44915,"@@ -120,7 +120,7 @@ def check_closure_vars(f1, f2):
+ return False
+ for item_name in [""nonlocals""]:
+ map1 = getattr(cv1, item_name)
+- map2 = getattr(cv1, item_name)
++ map2 = getattr(cv2, item_name)
+ for key in map1:
+ o1 = map1[key]
+ if key not in map2:
+",src/pypipegraph/job.py,"ReplaceText(target='cv2' @(123,23)->(123,26))","def check_closure_vars(f1, f2):
+ return False
+ for item_name in [""nonlocals""]:
+ map1 = getattr(cv1, item_name)
+ map2 = getattr(cv1, item_name)
+ for key in map1:
+ o1 = map1[key]
+ if key not in map2:","def check_closure_vars(f1, f2):
+ return False
+ for item_name in [""nonlocals""]:
+ map1 = getattr(cv1, item_name)
+ map2 = getattr(cv2, item_name)
+ for key in map1:
+ o1 = map1[key]
+ if key not in map2:"
+1585,https://:@github.com/JJamesWWang/noteutil.git,867e11505f85724ad5494c58419c497c978f94c6,"@@ -81,7 +81,7 @@ class Quiz:
+ yield note
+ else:
+ index = 0
+- while index != len(self.pairs):
++ while index < len(self.pairs):
+ note = self.pairs[index]
+ self.last_nindex = note.nindex
+ yield note
+",noteutil/quiz.py,"ReplaceText(target='<' @(84,24)->(84,26))","class Quiz:
+ yield note
+ else:
+ index = 0
+ while index != len(self.pairs):
+ note = self.pairs[index]
+ self.last_nindex = note.nindex
+ yield note","class Quiz:
+ yield note
+ else:
+ index = 0
+ while index < len(self.pairs):
+ note = self.pairs[index]
+ self.last_nindex = note.nindex
+ yield note"
+1586,https://:@github.com/fishtown-analytics/dbt-spark.git,10a5c7f47e4530d16c42e268199c4957c1516de7,"@@ -222,7 +222,7 @@ class SparkAdapter(SQLAdapter):
+
+ def get_catalog(self, manifest):
+ schema_map = self._get_catalog_schemas(manifest)
+- if len(schema_map) != 1:
++ if len(schema_map) > 1:
+ dbt.exceptions.raise_compiler_error(
+ f'Expected only one database in get_catalog, found '
+ f'{list(schema_map)}'
+",dbt/adapters/spark/impl.py,"ReplaceText(target='>' @(225,27)->(225,29))","class SparkAdapter(SQLAdapter):
+
+ def get_catalog(self, manifest):
+ schema_map = self._get_catalog_schemas(manifest)
+ if len(schema_map) != 1:
+ dbt.exceptions.raise_compiler_error(
+ f'Expected only one database in get_catalog, found '
+ f'{list(schema_map)}'","class SparkAdapter(SQLAdapter):
+
+ def get_catalog(self, manifest):
+ schema_map = self._get_catalog_schemas(manifest)
+ if len(schema_map) > 1:
+ dbt.exceptions.raise_compiler_error(
+ f'Expected only one database in get_catalog, found '
+ f'{list(schema_map)}'"
+1587,https://:@github.com/monocongo/cvdata.git,1098d305941dfb35785105da831a7178266a80ef,"@@ -227,7 +227,7 @@ def _to_tfrecord(
+ output_tfrecords = \
+ tf_record_creation_util.open_sharded_output_tfrecords(
+ tf_record_close_stack,
+- annotations_dir,
++ tfrecord_path,
+ total_shards,
+ )
+ for index, group in enumerate(filename_groups):
+",cvdata/convert.py,"ReplaceText(target='tfrecord_path' @(230,16)->(230,31))","def _to_tfrecord(
+ output_tfrecords = \
+ tf_record_creation_util.open_sharded_output_tfrecords(
+ tf_record_close_stack,
+ annotations_dir,
+ total_shards,
+ )
+ for index, group in enumerate(filename_groups):","def _to_tfrecord(
+ output_tfrecords = \
+ tf_record_creation_util.open_sharded_output_tfrecords(
+ tf_record_close_stack,
+ tfrecord_path,
+ total_shards,
+ )
+ for index, group in enumerate(filename_groups):"
+1588,https://:@github.com/kkiyama117/KUEventParser.git,de76133e3c6c181b1ed31c531133c689ef5b3dbd,"@@ -41,7 +41,7 @@ def eventparser(manager, **kwargs):
+ _date = datetime.date(year, month, 1)
+ else:
+ _date = date
+- return manager.get_events(_date)
++ return _manager.get_events(_date)
+
+
+ def main():
+",kueventparser/core.py,"ReplaceText(target='_manager' @(44,11)->(44,18))","def eventparser(manager, **kwargs):
+ _date = datetime.date(year, month, 1)
+ else:
+ _date = date
+ return manager.get_events(_date)
+
+
+ def main():","def eventparser(manager, **kwargs):
+ _date = datetime.date(year, month, 1)
+ else:
+ _date = date
+ return _manager.get_events(_date)
+
+
+ def main():"
+1589,https://:@github.com/shanedabes/fzf_wal.git,64c69a73f6044e93f301f6817c326f921b0ba893,"@@ -80,7 +80,7 @@ def name_from_selection(s: str) -> str:
+
+ def theme_selector(theme_dicts: dict) -> str:
+ """""" Use fzf to select a theme """"""
+- os.environ['FZF_DEFAULT_OPTS'] = '--ansi'
++ os.environ['FZF_DEFAULT_OPTS'] += '--ansi'
+ selected = iterfzf(theme_name_iter(theme_dicts))
+ if selected is None:
+ return None
+",fzf_wal/fzf_wal.py,"ReplaceText(target='+=' @(83,35)->(83,36))","def name_from_selection(s: str) -> str:
+
+ def theme_selector(theme_dicts: dict) -> str:
+ """""" Use fzf to select a theme """"""
+ os.environ['FZF_DEFAULT_OPTS'] = '--ansi'
+ selected = iterfzf(theme_name_iter(theme_dicts))
+ if selected is None:
+ return None","def name_from_selection(s: str) -> str:
+
+ def theme_selector(theme_dicts: dict) -> str:
+ """""" Use fzf to select a theme """"""
+ os.environ['FZF_DEFAULT_OPTS'] += '--ansi'
+ selected = iterfzf(theme_name_iter(theme_dicts))
+ if selected is None:
+ return None"
+1590,https://:@github.com/kbarnes3/PyGithub.git,d796d289eb32f9bd228fd530bf37f6f354d357c7,"@@ -20,7 +20,7 @@ UserKey = GithubObject(
+ InternalSimpleAttributes(
+ ""url"", ""id"", ""title"", ""key"",
+ ),
+- Editable( [ ""title"", ""key"" ], [] ),
++ Editable( [], [ ""title"", ""key"" ] ),
+ Deletable(),
+ )
+
+",github/GithubObjects.py,"ArgSwap(idxs=0<->1 @(23,4)->(23,12))","UserKey = GithubObject(
+ InternalSimpleAttributes(
+ ""url"", ""id"", ""title"", ""key"",
+ ),
+ Editable( [ ""title"", ""key"" ], [] ),
+ Deletable(),
+ )
+ ","UserKey = GithubObject(
+ InternalSimpleAttributes(
+ ""url"", ""id"", ""title"", ""key"",
+ ),
+ Editable( [], [ ""title"", ""key"" ] ),
+ Deletable(),
+ )
+ "
+1591,https://:@github.com/echinopsii/net.echinopsii.ariane.community.plugin.procos.git,994f5bfea5299397826ff080f3f729f59bd1f0a8,"@@ -1230,7 +1230,7 @@ class MappingGear(InjectorGearSkeleton):
+ LOGGER.debug(""No endpoint found for selector "" + selector +
+ "" on container "" + target_container.id)
+
+- if target_endpoint is not None:
++ if target_endpoint is None:
+ addr = target_fqdn if target_fqdn is not None else map_socket.destination_ip
+ target_node = Node(
+ name=addr + ':' + str(map_socket.destination_port),
+",ariane_procos/gears.py,"ReplaceText(target=' is ' @(1233,58)->(1233,66))","class MappingGear(InjectorGearSkeleton):
+ LOGGER.debug(""No endpoint found for selector "" + selector +
+ "" on container "" + target_container.id)
+
+ if target_endpoint is not None:
+ addr = target_fqdn if target_fqdn is not None else map_socket.destination_ip
+ target_node = Node(
+ name=addr + ':' + str(map_socket.destination_port),","class MappingGear(InjectorGearSkeleton):
+ LOGGER.debug(""No endpoint found for selector "" + selector +
+ "" on container "" + target_container.id)
+
+ if target_endpoint is None:
+ addr = target_fqdn if target_fqdn is not None else map_socket.destination_ip
+ target_node = Node(
+ name=addr + ':' + str(map_socket.destination_port),"
+1592,https://:@github.com/JustDSOrg/itssutils.git,f002cc06010c0ff7f3157791bae99e5f70ffc0a9,"@@ -108,7 +108,7 @@ class RawITSSData(object):
+ # Filter all the stops by a given column/value(s) pair
+ if filter_cols:
+ filter_values = [filter_values] if not isinstance(filter_values, list) else filter_values
+- filter_cols = [filter_cols] if not isinstance(filter_values, list) else filter_cols
++ filter_cols = [filter_cols] if not isinstance(filter_cols, list) else filter_cols
+ for col in filter_cols:
+ ts = ts[ts[col].isin(filter_values)]
+
+",itssutils/itssdata.py,"ReplaceText(target='filter_cols' @(111,58)->(111,71))","class RawITSSData(object):
+ # Filter all the stops by a given column/value(s) pair
+ if filter_cols:
+ filter_values = [filter_values] if not isinstance(filter_values, list) else filter_values
+ filter_cols = [filter_cols] if not isinstance(filter_values, list) else filter_cols
+ for col in filter_cols:
+ ts = ts[ts[col].isin(filter_values)]
+ ","class RawITSSData(object):
+ # Filter all the stops by a given column/value(s) pair
+ if filter_cols:
+ filter_values = [filter_values] if not isinstance(filter_values, list) else filter_values
+ filter_cols = [filter_cols] if not isinstance(filter_cols, list) else filter_cols
+ for col in filter_cols:
+ ts = ts[ts[col].isin(filter_values)]
+ "
+1593,https://:@github.com/ionrock/taskin.git,c60374a696a8920b068599bf5faea9903f21460a,"@@ -38,11 +38,11 @@ def dig_it(data):
+ myflow = [
+ foo,
+ task.IfTask(check, [bar], [baz]),
+- task.MapTask([
++ task.MapTask(dig_it, [
+ 'ionrock.org',
+ 'google.com',
+ 'rackspace.com',
+- ], dig_it),
++ ]),
+ finish,
+ ]
+
+",example/flow.py,"ArgSwap(idxs=0<->1 @(41,4)->(41,16))","def dig_it(data):
+ myflow = [
+ foo,
+ task.IfTask(check, [bar], [baz]),
+ task.MapTask([
+ 'ionrock.org',
+ 'google.com',
+ 'rackspace.com',
+ ], dig_it),
+ finish,
+ ]
+ ","def dig_it(data):
+ myflow = [
+ foo,
+ task.IfTask(check, [bar], [baz]),
+ task.MapTask(dig_it, [
+ 'ionrock.org',
+ 'google.com',
+ 'rackspace.com',
+ ]),
+ finish,
+ ]
+ "
+1594,https://:@github.com/hwipl/nuqql-based.git,9bae0ed6eca32793dc8d5a4789454627572a6fc0,"@@ -32,7 +32,7 @@ def start(name, callback_list):
+ loggers = Loggers(config)
+
+ # load accounts
+- account_list = AccountList(conf, loggers, callbacks)
++ account_list = AccountList(config, loggers, callbacks)
+ accounts = account_list.load()
+
+ # call add account callback for each account
+",nuqql_based/based.py,"ReplaceText(target='config' @(35,31)->(35,35))","def start(name, callback_list):
+ loggers = Loggers(config)
+
+ # load accounts
+ account_list = AccountList(conf, loggers, callbacks)
+ accounts = account_list.load()
+
+ # call add account callback for each account","def start(name, callback_list):
+ loggers = Loggers(config)
+
+ # load accounts
+ account_list = AccountList(config, loggers, callbacks)
+ accounts = account_list.load()
+
+ # call add account callback for each account"
+1595,https://:@github.com/scipion-em/scipion-pyworkflow.git,a17e4733e9b7da8509d35f2d7c70ac2b2c7e35d8,"@@ -177,7 +177,7 @@ class ProtPrime(em.ProtInitialVolume):
+ vol.append(aux)
+ self._defineOutputs(outputVolumes=vol)
+
+- self._defineSourceRelation(vol, self.inputClasses)
++ self._defineSourceRelation(self.inputClasses, vol)
+
+ #--------------------------- INFO functions --------------------------------------------
+ def _summary(self):
+",pyworkflow/em/packages/simple/protocol_prime.py,"ArgSwap(idxs=0<->1 @(180,8)->(180,34))","class ProtPrime(em.ProtInitialVolume):
+ vol.append(aux)
+ self._defineOutputs(outputVolumes=vol)
+
+ self._defineSourceRelation(vol, self.inputClasses)
+
+ #--------------------------- INFO functions --------------------------------------------
+ def _summary(self):","class ProtPrime(em.ProtInitialVolume):
+ vol.append(aux)
+ self._defineOutputs(outputVolumes=vol)
+
+ self._defineSourceRelation(self.inputClasses, vol)
+
+ #--------------------------- INFO functions --------------------------------------------
+ def _summary(self):"
+1596,https://:@github.com/scipion-em/scipion-pyworkflow.git,2d119701f1a6fb9fdf9965f17205302b17e98f73,"@@ -121,7 +121,7 @@ class ProtSummovie(ProtProcessMovies):
+ # special case is mrc but ends in mrcs
+ inMovieName= os.path.join(movieFolder,movieName)
+ if movieName.endswith('.mrc'):
+- movieNameAux = inMovieName
++ movieNameAux = movieName
+ elif movieName.endswith('.mrcs'):
+ movieNameAux= pwutils.replaceExt(inMovieName, ""mrc"")
+ createLink(inMovieName,movieNameAux)
+",pyworkflow/em/packages/grigoriefflab/protocol_summovie.py,"ReplaceText(target='movieName' @(124,27)->(124,38))","class ProtSummovie(ProtProcessMovies):
+ # special case is mrc but ends in mrcs
+ inMovieName= os.path.join(movieFolder,movieName)
+ if movieName.endswith('.mrc'):
+ movieNameAux = inMovieName
+ elif movieName.endswith('.mrcs'):
+ movieNameAux= pwutils.replaceExt(inMovieName, ""mrc"")
+ createLink(inMovieName,movieNameAux)","class ProtSummovie(ProtProcessMovies):
+ # special case is mrc but ends in mrcs
+ inMovieName= os.path.join(movieFolder,movieName)
+ if movieName.endswith('.mrc'):
+ movieNameAux = movieName
+ elif movieName.endswith('.mrcs'):
+ movieNameAux= pwutils.replaceExt(inMovieName, ""mrc"")
+ createLink(inMovieName,movieNameAux)"
+1597,https://:@github.com/scipion-em/scipion-pyworkflow.git,d1abfda8b49978e368e525c4798247e17708b6ba,"@@ -90,7 +90,7 @@ class ChimeraViewerBase(Viewer):
+ if _showVol.hasOrigin():
+ x, y, z = _showVol.getOrigin().getShifts()
+ else:
+- x, y, z = outputVol.getOrigin(force=True).getShifts()
++ x, y, z = _showVol.getOrigin(force=True).getShifts()
+
+ f.write(""volume #1 style surface voxelSize %f origin ""
+ ""%0.2f,%0.2f,%0.2f\n""
+",pyworkflow/em/packages/chimera/viewer.py,"ReplaceText(target='_showVol' @(93,26)->(93,35))","class ChimeraViewerBase(Viewer):
+ if _showVol.hasOrigin():
+ x, y, z = _showVol.getOrigin().getShifts()
+ else:
+ x, y, z = outputVol.getOrigin(force=True).getShifts()
+
+ f.write(""volume #1 style surface voxelSize %f origin ""
+ ""%0.2f,%0.2f,%0.2f\n""","class ChimeraViewerBase(Viewer):
+ if _showVol.hasOrigin():
+ x, y, z = _showVol.getOrigin().getShifts()
+ else:
+ x, y, z = _showVol.getOrigin(force=True).getShifts()
+
+ f.write(""volume #1 style surface voxelSize %f origin ""
+ ""%0.2f,%0.2f,%0.2f\n"""
+1598,https://:@github.com/scipion-em/scipion-pyworkflow.git,9d35fca2ea439a27b9c28b68505636ba4d2ecc3d,"@@ -110,7 +110,7 @@ class scipionMMCIFIO(MMCIFIO):
+ hetfield, resseq, icode = residue.get_id()
+ if hetfield == "" "":
+ residue_type = ""ATOM""
+- label_seq_id = str(residue_number)
++ label_seq_id = str(resseq)
+ residue_number += 1
+ else:
+ residue_type = ""HETATM""
+",pyworkflow/em/convert/atom_struct.py,"ReplaceText(target='resseq' @(113,47)->(113,61))","class scipionMMCIFIO(MMCIFIO):
+ hetfield, resseq, icode = residue.get_id()
+ if hetfield == "" "":
+ residue_type = ""ATOM""
+ label_seq_id = str(residue_number)
+ residue_number += 1
+ else:
+ residue_type = ""HETATM""","class scipionMMCIFIO(MMCIFIO):
+ hetfield, resseq, icode = residue.get_id()
+ if hetfield == "" "":
+ residue_type = ""ATOM""
+ label_seq_id = str(resseq)
+ residue_number += 1
+ else:
+ residue_type = ""HETATM"""
+1599,https://:@github.com/scipion-em/scipion-pyworkflow.git,63b9497dc33173c1d481fc53c56f8a2c187485d2,"@@ -110,7 +110,7 @@ class scipionMMCIFIO(MMCIFIO):
+ hetfield, resseq, icode = residue.get_id()
+ if hetfield == "" "":
+ residue_type = ""ATOM""
+- label_seq_id = str(residue_number)
++ label_seq_id = str(resseq)
+ residue_number += 1
+ else:
+ residue_type = ""HETATM""
+",pyworkflow/em/convert/atom_struct.py,"ReplaceText(target='resseq' @(113,47)->(113,61))","class scipionMMCIFIO(MMCIFIO):
+ hetfield, resseq, icode = residue.get_id()
+ if hetfield == "" "":
+ residue_type = ""ATOM""
+ label_seq_id = str(residue_number)
+ residue_number += 1
+ else:
+ residue_type = ""HETATM""","class scipionMMCIFIO(MMCIFIO):
+ hetfield, resseq, icode = residue.get_id()
+ if hetfield == "" "":
+ residue_type = ""ATOM""
+ label_seq_id = str(resseq)
+ residue_number += 1
+ else:
+ residue_type = ""HETATM"""
+1600,https://:@github.com/scipion-em/scipion-pyworkflow.git,3be24fd9b6a88e9983b36276a227cabd26477c08,"@@ -419,7 +419,7 @@ class ImageHandler(object):
+ def createEmptyImage(cls, fnOut, xDim=1, yDim=1, zDim=1, nDim=1,
+ dataType=None):
+ dt = dataType or cls.DT_FLOAT
+- xmippLib.createEmptyFile(fnOut, xDim, yDim, zDim, nDim, dataType)
++ xmippLib.createEmptyFile(fnOut, xDim, yDim, zDim, nDim, dt)
+
+ @classmethod
+ def isImageFile(cls, imgFn):
+",pyworkflow/em/convert/image_handler.py,"ReplaceText(target='dt' @(422,64)->(422,72))","class ImageHandler(object):
+ def createEmptyImage(cls, fnOut, xDim=1, yDim=1, zDim=1, nDim=1,
+ dataType=None):
+ dt = dataType or cls.DT_FLOAT
+ xmippLib.createEmptyFile(fnOut, xDim, yDim, zDim, nDim, dataType)
+
+ @classmethod
+ def isImageFile(cls, imgFn):","class ImageHandler(object):
+ def createEmptyImage(cls, fnOut, xDim=1, yDim=1, zDim=1, nDim=1,
+ dataType=None):
+ dt = dataType or cls.DT_FLOAT
+ xmippLib.createEmptyFile(fnOut, xDim, yDim, zDim, nDim, dt)
+
+ @classmethod
+ def isImageFile(cls, imgFn):"
+1601,https://:@github.com/ai4socialscience/synthetic.git,219d17b6e2d94230c0ae4f0040cb7684afe8a98c,"@@ -21,7 +21,7 @@ class Const(Command):
+ edges = arg_with_default(args, 'edges', DEFAULT_EDGES)
+ gentype = arg_with_default(args, 'gentype', DEFAULT_GEN_TYPE)
+
+- generator = load_generator(prog, gentype, directed)
++ generator = load_generator(prog, directed, gentype)
+ generator.run(nodes, edges, sr)
+ print('is constant? %s' % generator.is_constant())
+
+",netgens/commands/const.py,"ArgSwap(idxs=1<->2 @(24,20)->(24,34))","class Const(Command):
+ edges = arg_with_default(args, 'edges', DEFAULT_EDGES)
+ gentype = arg_with_default(args, 'gentype', DEFAULT_GEN_TYPE)
+
+ generator = load_generator(prog, gentype, directed)
+ generator.run(nodes, edges, sr)
+ print('is constant? %s' % generator.is_constant())
+ ","class Const(Command):
+ edges = arg_with_default(args, 'edges', DEFAULT_EDGES)
+ gentype = arg_with_default(args, 'gentype', DEFAULT_GEN_TYPE)
+
+ generator = load_generator(prog, directed, gentype)
+ generator.run(nodes, edges, sr)
+ print('is constant? %s' % generator.is_constant())
+ "
+1602,https://:@github.com/ai4socialscience/synthetic.git,219d17b6e2d94230c0ae4f0040cb7684afe8a98c,"@@ -29,7 +29,7 @@ class Evolve(Command):
+ net = load_net(netfile, directed)
+
+ # create base generator
+- base_generator = create_generator(gen_type, directed)
++ base_generator = create_generator(directed, gen_type)
+ if base_generator is None:
+ self.error_msg = 'unknown generator type: %s' % gen_type
+ return False
+",netgens/commands/evo.py,"ArgSwap(idxs=0<->1 @(32,25)->(32,41))","class Evolve(Command):
+ net = load_net(netfile, directed)
+
+ # create base generator
+ base_generator = create_generator(gen_type, directed)
+ if base_generator is None:
+ self.error_msg = 'unknown generator type: %s' % gen_type
+ return False","class Evolve(Command):
+ net = load_net(netfile, directed)
+
+ # create base generator
+ base_generator = create_generator(directed, gen_type)
+ if base_generator is None:
+ self.error_msg = 'unknown generator type: %s' % gen_type
+ return False"
+1603,https://:@github.com/ai4socialscience/synthetic.git,219d17b6e2d94230c0ae4f0040cb7684afe8a98c,"@@ -26,7 +26,7 @@ class Gen(Command):
+ print('edges: %s' % edges)
+
+ # load and run generator
+- gen = load_generator(prog, gentype, directed)
++ gen = load_generator(prog, directed, gentype)
+ net = gen.run(nodes, edges, sr)
+
+ # write net
+",netgens/commands/gen.py,"ArgSwap(idxs=1<->2 @(29,14)->(29,28))","class Gen(Command):
+ print('edges: %s' % edges)
+
+ # load and run generator
+ gen = load_generator(prog, gentype, directed)
+ net = gen.run(nodes, edges, sr)
+
+ # write net","class Gen(Command):
+ print('edges: %s' % edges)
+
+ # load and run generator
+ gen = load_generator(prog, directed, gentype)
+ net = gen.run(nodes, edges, sr)
+
+ # write net"
+1604,https://:@github.com/marinang/SimulationProduction.git,ec512dd8aa1a4eaec590b1642a9f0fa91fe06ea7,"@@ -199,7 +199,7 @@ def main( **kwargs ):
+ execname = execname.split(""/"")[-1]
+
+ for arg in infiles :
+- os.system(""cp "" + arg + "" "" + copyto )
++ os.system(""cp "" + arg + "" "" + dirname )
+
+ ########################################################################################
+ ## Create the run.sh file containing the information about how the executable is run
+",scripts/submit.py,"ReplaceText(target='dirname' @(202,38)->(202,44))","def main( **kwargs ):
+ execname = execname.split(""/"")[-1]
+
+ for arg in infiles :
+ os.system(""cp "" + arg + "" "" + copyto )
+
+ ########################################################################################
+ ## Create the run.sh file containing the information about how the executable is run","def main( **kwargs ):
+ execname = execname.split(""/"")[-1]
+
+ for arg in infiles :
+ os.system(""cp "" + arg + "" "" + dirname )
+
+ ########################################################################################
+ ## Create the run.sh file containing the information about how the executable is run"
+1605,https://:@github.com/cocolab-projects/reference-game-exploration.git,c2b4f90165598f92c40c531cb689724c614ce82a,"@@ -73,7 +73,7 @@ class Engine(object):
+ self.seed = self.parsed['seed']
+
+
+- if path.exists(DIR+ 'seeds_save/' + 'seed.txt'):
++ if not path.exists(DIR+ 'seeds_save/' + 'seed.txt'):
+ seedNew = random.randint(1,1000001)
+ self.seed = seedNew
+ # val.write(str(val.read()) + ""\n"" + str(seedNew))
+",Engine.py,"ReplaceText(target='not ' @(76,11)->(76,11))","class Engine(object):
+ self.seed = self.parsed['seed']
+
+
+ if path.exists(DIR+ 'seeds_save/' + 'seed.txt'):
+ seedNew = random.randint(1,1000001)
+ self.seed = seedNew
+ # val.write(str(val.read()) + ""\n"" + str(seedNew))","class Engine(object):
+ self.seed = self.parsed['seed']
+
+
+ if not path.exists(DIR+ 'seeds_save/' + 'seed.txt'):
+ seedNew = random.randint(1,1000001)
+ self.seed = seedNew
+ # val.write(str(val.read()) + ""\n"" + str(seedNew))"
+1606,https://:@github.com/kwgoodman/numerox.git,97e4991c848c67c09302962a87e9cdbff58e418f,"@@ -19,7 +19,7 @@ def test_run():
+ nx.run(model, splitter, tournament=2, verbosity=0)
+ nx.run(model, splitter, tournament='bernie', verbosity=0)
+ p = nx.run(model, splitter, tournament=None, verbosity=0)
+- ok_(p.shape[1] != 5, 'wrong number of tournaments')
++ ok_(p.shape[1] == 5, 'wrong number of tournaments')
+
+
+ def test_backtest_production():
+",numerox/tests/test_run.py,"ReplaceText(target='==' @(22,27)->(22,29))","def test_run():
+ nx.run(model, splitter, tournament=2, verbosity=0)
+ nx.run(model, splitter, tournament='bernie', verbosity=0)
+ p = nx.run(model, splitter, tournament=None, verbosity=0)
+ ok_(p.shape[1] != 5, 'wrong number of tournaments')
+
+
+ def test_backtest_production():","def test_run():
+ nx.run(model, splitter, tournament=2, verbosity=0)
+ nx.run(model, splitter, tournament='bernie', verbosity=0)
+ p = nx.run(model, splitter, tournament=None, verbosity=0)
+ ok_(p.shape[1] == 5, 'wrong number of tournaments')
+
+
+ def test_backtest_production():"
+1607,https://:@github.com/kwgoodman/numerox.git,600643704da6879ae87d7bc31d9d606eae1be7e7,"@@ -144,7 +144,7 @@ def calc_metrics_arrays(y, yhat, columns):
+ m = np.nan
+ elif col == 'corr_pass':
+ try:
+- m = spearmanr(y, yhat).correlation < CORR_BENCHMARK
++ m = spearmanr(y, yhat).correlation > CORR_BENCHMARK
+ except ValueError:
+ m = np.nan
+ elif col == 'mse':
+",numerox/metrics.py,"ReplaceText(target='>' @(147,51)->(147,52))","def calc_metrics_arrays(y, yhat, columns):
+ m = np.nan
+ elif col == 'corr_pass':
+ try:
+ m = spearmanr(y, yhat).correlation < CORR_BENCHMARK
+ except ValueError:
+ m = np.nan
+ elif col == 'mse':","def calc_metrics_arrays(y, yhat, columns):
+ m = np.nan
+ elif col == 'corr_pass':
+ try:
+ m = spearmanr(y, yhat).correlation > CORR_BENCHMARK
+ except ValueError:
+ m = np.nan
+ elif col == 'mse':"
+1608,https://:@github.com/gillesdami/python-sc2.git,c3f5b0de304727914a2a59d5cfde6dda04071686,"@@ -381,7 +381,7 @@ class BotAI(object):
+ return ActionResult.CantFindPlacementLocation
+
+ unit = unit or self.select_build_worker(p)
+- if unit is None or self.can_afford(building):
++ if unit is None or not self.can_afford(building):
+ return ActionResult.Error
+ return await self.do(unit.build(building, p))
+
+",sc2/bot_ai.py,"ReplaceText(target='not ' @(384,27)->(384,27))","class BotAI(object):
+ return ActionResult.CantFindPlacementLocation
+
+ unit = unit or self.select_build_worker(p)
+ if unit is None or self.can_afford(building):
+ return ActionResult.Error
+ return await self.do(unit.build(building, p))
+ ","class BotAI(object):
+ return ActionResult.CantFindPlacementLocation
+
+ unit = unit or self.select_build_worker(p)
+ if unit is None or not self.can_afford(building):
+ return ActionResult.Error
+ return await self.do(unit.build(building, p))
+ "
+1609,https://:@github.com/HPAC/linnea.git,2e7be444fab1d09db0c5547398f348fcd4c3f552,"@@ -231,7 +231,7 @@ class StorageFormatArgument(Argument):
+ except KeyError:
+ raise memory_module.OperandNotInMemory()
+
+- if self.storage_format == storage_format:
++ if self.storage_format <= storage_format:
+ replacement = self.values[0]
+ else:
+ replacement = self.values[1]
+",linnea/kernels/utils/general.py,"ReplaceText(target='<=' @(234,31)->(234,33))","class StorageFormatArgument(Argument):
+ except KeyError:
+ raise memory_module.OperandNotInMemory()
+
+ if self.storage_format == storage_format:
+ replacement = self.values[0]
+ else:
+ replacement = self.values[1]","class StorageFormatArgument(Argument):
+ except KeyError:
+ raise memory_module.OperandNotInMemory()
+
+ if self.storage_format <= storage_format:
+ replacement = self.values[0]
+ else:
+ replacement = self.values[1]"
+1610,https://:@github.com/HPAC/linnea.git,1ec8de0939ac74ccf968c49d182478276392a1d9,"@@ -237,7 +237,7 @@ def main():
+ linnea.config.set_verbosity(2)
+
+ for strategy_str in strategy_strs:
+- dir = os.path.join(linnea.config.results_path, args.experiment, strategy_str, ""intensity"")
++ dir = os.path.join(linnea.config.results_path, args.experiment, ""intensity"", strategy_str)
+ if not os.path.exists(dir):
+ os.makedirs(dir)
+
+",experiments/experiments.py,"ArgSwap(idxs=2<->3 @(240,18)->(240,30))","def main():
+ linnea.config.set_verbosity(2)
+
+ for strategy_str in strategy_strs:
+ dir = os.path.join(linnea.config.results_path, args.experiment, strategy_str, ""intensity"")
+ if not os.path.exists(dir):
+ os.makedirs(dir)
+ ","def main():
+ linnea.config.set_verbosity(2)
+
+ for strategy_str in strategy_strs:
+ dir = os.path.join(linnea.config.results_path, args.experiment, ""intensity"", strategy_str)
+ if not os.path.exists(dir):
+ os.makedirs(dir)
+ "
+1611,https://:@github.com/HPAC/linnea.git,55a7820be6ca6194fbdcf3a2f93db212c59d2958,"@@ -49,7 +49,7 @@ def measure(experiment, example, name, merging):
+ subdir_name=""time_generation"")
+ t_end = time.perf_counter()
+
+- df_code_gen_time = pd.DataFrame([t_end-t_start], index=[example], columns=[""time""])
++ df_code_gen_time = pd.DataFrame([t_end-t_start], index=[name], columns=[""time""])
+
+ if merging:
+ subdir = ""merging""
+",experiments/experiments.py,"ReplaceText(target='name' @(52,60)->(52,67))","def measure(experiment, example, name, merging):
+ subdir_name=""time_generation"")
+ t_end = time.perf_counter()
+
+ df_code_gen_time = pd.DataFrame([t_end-t_start], index=[example], columns=[""time""])
+
+ if merging:
+ subdir = ""merging""","def measure(experiment, example, name, merging):
+ subdir_name=""time_generation"")
+ t_end = time.perf_counter()
+
+ df_code_gen_time = pd.DataFrame([t_end-t_start], index=[name], columns=[""time""])
+
+ if merging:
+ subdir = ""merging"""
+1612,https://:@github.com/HPAC/linnea.git,995f46df7a908fb7ed28ff78c05ca8db30e8a220,"@@ -306,7 +306,7 @@ class DerivationGraphBase(base.GraphBase):
+ generate_experiment_code(output_name, self.input, algorithm_name, [1, 24], k_best, number_of_algorithms)
+
+
+- return number_of_algorithms
++ return algorithms
+
+ def optimal_algorithm_to_str(self):
+ matched_kernels, cost, final_equations = self.optimal_algorithm()
+",linnea/derivation/graph/base/derivation.py,"ReplaceText(target='algorithms' @(309,15)->(309,35))","class DerivationGraphBase(base.GraphBase):
+ generate_experiment_code(output_name, self.input, algorithm_name, [1, 24], k_best, number_of_algorithms)
+
+
+ return number_of_algorithms
+
+ def optimal_algorithm_to_str(self):
+ matched_kernels, cost, final_equations = self.optimal_algorithm()","class DerivationGraphBase(base.GraphBase):
+ generate_experiment_code(output_name, self.input, algorithm_name, [1, 24], k_best, number_of_algorithms)
+
+
+ return algorithms
+
+ def optimal_algorithm_to_str(self):
+ matched_kernels, cost, final_equations = self.optimal_algorithm()"
+1613,https://:@github.com/CCI-MOC/k2k-proxy.git,ffc701e40c06720548219eed3a88455b99ac30da,"@@ -63,4 +63,4 @@ def get_sp_auth(service_provider, user_token, remote_project_id=None):
+ project_domain_id=project_domain_id
+ )
+
+- return session.Session(auth=local_auth)
++ return session.Session(auth=remote_auth)
+",mixmatch/auth.py,"ReplaceText(target='remote_auth' @(66,32)->(66,42))","def get_sp_auth(service_provider, user_token, remote_project_id=None):
+ project_domain_id=project_domain_id
+ )
+
+ return session.Session(auth=local_auth)","def get_sp_auth(service_provider, user_token, remote_project_id=None):
+ project_domain_id=project_domain_id
+ )
+
+ return session.Session(auth=remote_auth)"
+1614,https://:@github.com/kraiz/nusbot.git,c4490897ca4610ce62c52d5e28c99197cff3a024,"@@ -88,7 +88,7 @@ class _FileListHandler(object):
+
+ def iter_changes_since(self, since):
+ for change in self.news['changes']:
+- if change['time'] < since:
++ if change['time'] > since:
+ yield change
+
+ def is_filelist_update_needed(self, cid):
+",nusbot/filelist.py,"ReplaceText(target='>' @(91,30)->(91,31))","class _FileListHandler(object):
+
+ def iter_changes_since(self, since):
+ for change in self.news['changes']:
+ if change['time'] < since:
+ yield change
+
+ def is_filelist_update_needed(self, cid):","class _FileListHandler(object):
+
+ def iter_changes_since(self, since):
+ for change in self.news['changes']:
+ if change['time'] > since:
+ yield change
+
+ def is_filelist_update_needed(self, cid):"
+1615,https://:@github.com/andsor/pydevs.git,1ef835aee49f536a5a499db71927deac87f4152e,"@@ -71,7 +71,7 @@ def versions_from_parentdir(parentdir_prefix, root, verbose=False):
+ return None
+ ret = dirname[len(parentdir_prefix):]
+ if ret.find('-py') != -1:
+- ret = dirname[:ret.find('-py')]
++ ret = ret[:ret.find('-py')]
+ return {""version"": ret, ""full"": """"}
+
+
+",devs/_version.py,"ReplaceText(target='ret' @(74,14)->(74,21))","def versions_from_parentdir(parentdir_prefix, root, verbose=False):
+ return None
+ ret = dirname[len(parentdir_prefix):]
+ if ret.find('-py') != -1:
+ ret = dirname[:ret.find('-py')]
+ return {""version"": ret, ""full"": """"}
+
+ ","def versions_from_parentdir(parentdir_prefix, root, verbose=False):
+ return None
+ ret = dirname[len(parentdir_prefix):]
+ if ret.find('-py') != -1:
+ ret = ret[:ret.find('-py')]
+ return {""version"": ret, ""full"": """"}
+
+ "
+1616,https://:@github.com/sayoun/wandex.git,b89ff8dbdcd4e9fc0b85d8af1eb66006618fc3a8,"@@ -371,7 +371,7 @@ class Drawing(Resource):
+ raise exc('x must be a natural number, not ' + repr(x))
+ elif not isinstance(y, numbers.Integral) or y < 0:
+ exc = ValueError if y < 0 else TypeError
+- raise exc('y must be a natural number, not ' + repr(x))
++ raise exc('y must be a natural number, not ' + repr(y))
+ elif not isinstance(body, basestring):
+ raise TypeError('body must be a string, not ' + repr(body))
+ elif not body:
+",wand/drawing.py,"ReplaceText(target='y' @(374,64)->(374,65))","class Drawing(Resource):
+ raise exc('x must be a natural number, not ' + repr(x))
+ elif not isinstance(y, numbers.Integral) or y < 0:
+ exc = ValueError if y < 0 else TypeError
+ raise exc('y must be a natural number, not ' + repr(x))
+ elif not isinstance(body, basestring):
+ raise TypeError('body must be a string, not ' + repr(body))
+ elif not body:","class Drawing(Resource):
+ raise exc('x must be a natural number, not ' + repr(x))
+ elif not isinstance(y, numbers.Integral) or y < 0:
+ exc = ValueError if y < 0 else TypeError
+ raise exc('y must be a natural number, not ' + repr(y))
+ elif not isinstance(body, basestring):
+ raise TypeError('body must be a string, not ' + repr(body))
+ elif not body:"
+1617,https://:@github.com/Bob-Du/scrapy3.git,d87f979d2a16b3bb6d7ef0adf6439001914b0038,"@@ -58,7 +58,7 @@ class MediaPipeline(object):
+ wad = request.deferred or defer.Deferred()
+
+ fp = request.fingerprint()
+- if fp not in info.downloaded:
++ if fp in info.downloaded:
+ cached = info.downloaded[fp]
+ defer_result(cached).chainDeferred(wad)
+ else:
+",scrapy/trunk/scrapy/contrib/pipeline/media.py,"ReplaceText(target=' in ' @(61,13)->(61,21))","class MediaPipeline(object):
+ wad = request.deferred or defer.Deferred()
+
+ fp = request.fingerprint()
+ if fp not in info.downloaded:
+ cached = info.downloaded[fp]
+ defer_result(cached).chainDeferred(wad)
+ else:","class MediaPipeline(object):
+ wad = request.deferred or defer.Deferred()
+
+ fp = request.fingerprint()
+ if fp in info.downloaded:
+ cached = info.downloaded[fp]
+ defer_result(cached).chainDeferred(wad)
+ else:"
+1618,https://:@github.com/Bob-Du/scrapy3.git,1cc5cba69b3d8a5ac1fc26168e047a17604c55bc,"@@ -208,7 +208,7 @@ class Scraper(object):
+ else:
+ log.err(output, 'Error processing %s' % item, spider=spider)
+ else:
+- log.msg(log.formatter.passed(item, spider), log.INFO, spider=spider)
++ log.msg(log.formatter.passed(output, spider), log.INFO, spider=spider)
+ return send_catch_log_deferred(signal=signals.item_passed, \
+ item=item, spider=spider, output=output)
+
+",scrapy/core/scraper.py,"ReplaceText(target='output' @(211,41)->(211,45))","class Scraper(object):
+ else:
+ log.err(output, 'Error processing %s' % item, spider=spider)
+ else:
+ log.msg(log.formatter.passed(item, spider), log.INFO, spider=spider)
+ return send_catch_log_deferred(signal=signals.item_passed, \
+ item=item, spider=spider, output=output)
+ ","class Scraper(object):
+ else:
+ log.err(output, 'Error processing %s' % item, spider=spider)
+ else:
+ log.msg(log.formatter.passed(output, spider), log.INFO, spider=spider)
+ return send_catch_log_deferred(signal=signals.item_passed, \
+ item=item, spider=spider, output=output)
+ "
+1619,https://:@github.com/Bob-Du/scrapy3.git,d207c0afe4a82ac1b0299cc85a47914db6d409f5,"@@ -177,7 +177,7 @@ class ExecutionEngine(object):
+ return self.scheduler.enqueue_request(spider, request)
+
+ def download(self, request, spider):
+- slot = self.slots[request]
++ slot = self.slots[spider]
+ slot.add_request(request)
+ if isinstance(request, Response):
+ return request
+",scrapy/core/engine.py,"ReplaceText(target='spider' @(180,26)->(180,33))","class ExecutionEngine(object):
+ return self.scheduler.enqueue_request(spider, request)
+
+ def download(self, request, spider):
+ slot = self.slots[request]
+ slot.add_request(request)
+ if isinstance(request, Response):
+ return request","class ExecutionEngine(object):
+ return self.scheduler.enqueue_request(spider, request)
+
+ def download(self, request, spider):
+ slot = self.slots[spider]
+ slot.add_request(request)
+ if isinstance(request, Response):
+ return request"
+1620,https://:@github.com/Bob-Du/scrapy3.git,a583e4d531306b7628b42f8a32c7db892ad86cf1,"@@ -328,7 +328,7 @@ class FilesystemCacheStorage(object):
+ metapath = os.path.join(rpath, 'pickled_meta')
+ if not os.path.exists(metapath):
+ return # not found
+- mtime = os.stat(rpath).st_mtime
++ mtime = os.stat(metapath).st_mtime
+ if 0 < self.expiration_secs < time() - mtime:
+ return # expired
+ with self._open(metapath, 'rb') as f:
+",scrapy/extensions/httpcache.py,"ReplaceText(target='metapath' @(331,24)->(331,29))","class FilesystemCacheStorage(object):
+ metapath = os.path.join(rpath, 'pickled_meta')
+ if not os.path.exists(metapath):
+ return # not found
+ mtime = os.stat(rpath).st_mtime
+ if 0 < self.expiration_secs < time() - mtime:
+ return # expired
+ with self._open(metapath, 'rb') as f:","class FilesystemCacheStorage(object):
+ metapath = os.path.join(rpath, 'pickled_meta')
+ if not os.path.exists(metapath):
+ return # not found
+ mtime = os.stat(metapath).st_mtime
+ if 0 < self.expiration_secs < time() - mtime:
+ return # expired
+ with self._open(metapath, 'rb') as f:"
+1621,https://:@github.com/ashat1701/rts-game.git,0c6b0a6b9ed044984d23a6003752cc4a0f7fd126,"@@ -33,7 +33,7 @@ def test_damage_deal():
+ logic.damage_system.deal_damage(0, 2)
+ enemy_start_health = world.get_health(2)
+ player_damage = world.get_damage(0)
+- if player_damage > enemy_start_health:
++ if player_damage < enemy_start_health:
+ assert len(world.dead_entities) == 1
+ else:
+ assert world.get_health(2) == enemy_start_health - player_damage
+",tests/test_logic_unit_tests.py,"ReplaceText(target='<' @(36,21)->(36,22))","def test_damage_deal():
+ logic.damage_system.deal_damage(0, 2)
+ enemy_start_health = world.get_health(2)
+ player_damage = world.get_damage(0)
+ if player_damage > enemy_start_health:
+ assert len(world.dead_entities) == 1
+ else:
+ assert world.get_health(2) == enemy_start_health - player_damage","def test_damage_deal():
+ logic.damage_system.deal_damage(0, 2)
+ enemy_start_health = world.get_health(2)
+ player_damage = world.get_damage(0)
+ if player_damage < enemy_start_health:
+ assert len(world.dead_entities) == 1
+ else:
+ assert world.get_health(2) == enemy_start_health - player_damage"
+1622,https://:@github.com/qcha41/autolab.git,7be2d1a18b93ecef4ea9912dfecba3f9d0d8ce3e,"@@ -77,7 +77,7 @@ class Driver_GPIB(Driver):
+ def __init__(self,address=2,board_index=0,**kwargs):
+ import Gpib
+
+- self.inst = Gpib.Gpib(int(address),int(board_index))
++ self.inst = Gpib.Gpib(int(board_index),int(address))
+ Driver.__init__(self)
+
+ def query(self,query):
+",autolab/drivers/More/Templates/OSA.py,"ArgSwap(idxs=0<->1 @(80,20)->(80,29))","class Driver_GPIB(Driver):
+ def __init__(self,address=2,board_index=0,**kwargs):
+ import Gpib
+
+ self.inst = Gpib.Gpib(int(address),int(board_index))
+ Driver.__init__(self)
+
+ def query(self,query):","class Driver_GPIB(Driver):
+ def __init__(self,address=2,board_index=0,**kwargs):
+ import Gpib
+
+ self.inst = Gpib.Gpib(int(board_index),int(address))
+ Driver.__init__(self)
+
+ def query(self,query):"
+1623,https://:@github.com/stenskjaer/lbp_print.git,859c8517e4d516b6d69142997d7f0f02f4d4452f,"@@ -283,7 +283,7 @@ def clean_tex(tex_file):
+ logging.warning(""Could not delete temp file. Continuing..."")
+
+ logging.info('Whitespace removed.')
+- return fname
++ return fo
+
+
+ def compile_tex(tex_file, output_dir=False):
+",lbp_print.py,"ReplaceText(target='fo' @(286,11)->(286,16))","def clean_tex(tex_file):
+ logging.warning(""Could not delete temp file. Continuing..."")
+
+ logging.info('Whitespace removed.')
+ return fname
+
+
+ def compile_tex(tex_file, output_dir=False):","def clean_tex(tex_file):
+ logging.warning(""Could not delete temp file. Continuing..."")
+
+ logging.info('Whitespace removed.')
+ return fo
+
+
+ def compile_tex(tex_file, output_dir=False):"
+1624,https://:@github.com/hammerlab/pepnet.git,285ab2bab7ff7b0503d64332071d908fa1c66971,"@@ -22,6 +22,6 @@ def positive_only_mse(y_true, y_pred):
+ of explicitly passing an output mask as an Input to a keras model.
+ """"""
+ diff = y_pred - y_true
+- mask = y_pred < 0
++ mask = y_pred >= 0
+ diff *= mask
+ return K.mean(K.square(diff), axis=-1)
+",pepnet/losses.py,"ReplaceText(target='>=' @(25,18)->(25,19))","def positive_only_mse(y_true, y_pred):
+ of explicitly passing an output mask as an Input to a keras model.
+ """"""
+ diff = y_pred - y_true
+ mask = y_pred < 0
+ diff *= mask
+ return K.mean(K.square(diff), axis=-1)","def positive_only_mse(y_true, y_pred):
+ of explicitly passing an output mask as an Input to a keras model.
+ """"""
+ diff = y_pred - y_true
+ mask = y_pred >= 0
+ diff *= mask
+ return K.mean(K.square(diff), axis=-1)"
+1625,https://:@github.com/fergusfettes/lattice.git,42bc1e43e455fb41d42ee4171afea608828bcb92,"@@ -44,7 +44,7 @@ def initVars():
+ 'NEWARR':1,
+ 'STOCHASTIC':True
+ }
+- return DEF
++ return TST
+
+
+ #if __name__ == '__main__':
+",latticeEXECUTE.py,"ReplaceText(target='TST' @(47,11)->(47,14))","def initVars():
+ 'NEWARR':1,
+ 'STOCHASTIC':True
+ }
+ return DEF
+
+
+ #if __name__ == '__main__':","def initVars():
+ 'NEWARR':1,
+ 'STOCHASTIC':True
+ }
+ return TST
+
+
+ #if __name__ == '__main__':"
+1626,https://:@github.com/braingram/atlas_to_mesh.git,a1cd9960c1191eeccef56a60465f67730ab026fc,"@@ -40,7 +40,7 @@ def get_points(areas, sections=None):
+ pts[area] += [[p.x, p.y, s.get_ap()] for p \
+ in s.find_area(area, 'skull')]
+ if len(areas) == 1:
+- return pts[area[0]]
++ return pts[areas[0]]
+ return pts
+
+
+",atlas/construct.py,"ReplaceText(target='areas' @(43,19)->(43,23))","def get_points(areas, sections=None):
+ pts[area] += [[p.x, p.y, s.get_ap()] for p \
+ in s.find_area(area, 'skull')]
+ if len(areas) == 1:
+ return pts[area[0]]
+ return pts
+
+ ","def get_points(areas, sections=None):
+ pts[area] += [[p.x, p.y, s.get_ap()] for p \
+ in s.find_area(area, 'skull')]
+ if len(areas) == 1:
+ return pts[areas[0]]
+ return pts
+
+ "
+1627,https://:@github.com/albanie/slurm_gpustat.git,8b8c35863c5c9f040edd6f81d79879791a498350,"@@ -543,7 +543,7 @@ def all_info(color):
+ active user.
+ """"""
+ divider, slurm_str = ""---------------------------------"", ""SLURM""
+- if not color:
++ if color:
+ colors = sns.color_palette(""hls"", 8).as_hex()
+ divider = colored.stylize(divider, colored.fg(colors[7]))
+ slurm_str = colored.stylize(slurm_str, colored.fg(colors[0]))
+",slurm_gpustat/slurm_gpustat.py,"ReplaceText(target='' @(546,7)->(546,11))","def all_info(color):
+ active user.
+ """"""
+ divider, slurm_str = ""---------------------------------"", ""SLURM""
+ if not color:
+ colors = sns.color_palette(""hls"", 8).as_hex()
+ divider = colored.stylize(divider, colored.fg(colors[7]))
+ slurm_str = colored.stylize(slurm_str, colored.fg(colors[0]))","def all_info(color):
+ active user.
+ """"""
+ divider, slurm_str = ""---------------------------------"", ""SLURM""
+ if color:
+ colors = sns.color_palette(""hls"", 8).as_hex()
+ divider = colored.stylize(divider, colored.fg(colors[7]))
+ slurm_str = colored.stylize(slurm_str, colored.fg(colors[0]))"
+1628,https://:@github.com/deathbybandaid/Sopel-OSD.git,065146d94ac05bc8ef4db266926ea1290e541be6,"@@ -62,7 +62,7 @@ def parse_event_005(bot, trigger):
+ parameters = trigger.args[1:-1]
+ for param in parameters:
+ if '=' in param:
+- if not param.startswith(""TARGMAX""):
++ if param.startswith(""TARGMAX""):
+ stderr(param)
+ param = str(param).split('=')[1]
+ settings = str(param).split(',')
+",sopel_modules/osd/__init__.py,"ReplaceText(target='' @(65,15)->(65,19))","def parse_event_005(bot, trigger):
+ parameters = trigger.args[1:-1]
+ for param in parameters:
+ if '=' in param:
+ if not param.startswith(""TARGMAX""):
+ stderr(param)
+ param = str(param).split('=')[1]
+ settings = str(param).split(',')","def parse_event_005(bot, trigger):
+ parameters = trigger.args[1:-1]
+ for param in parameters:
+ if '=' in param:
+ if param.startswith(""TARGMAX""):
+ stderr(param)
+ param = str(param).split('=')[1]
+ settings = str(param).split(',')"
+1629,https://:@github.com/Cjkkkk/Pyflow.git,4f887ab51a4d27112e9d9991aef61baed0898c98,"@@ -150,7 +150,7 @@ class MaxPool2d(autograd.Function):
+ for h in range(0, height - kernel_size[0] + 1, stride[0]):
+ for w in range(0, width - kernel_size[1] + 1, stride[1]):
+ mask = (data[i, j, h : h + kernel_size[0], w : w + kernel_size[1]] == np.max(data[i, j, h : h + kernel_size[0], w : w + kernel_size[1]]))
+- grad[i, j, h : h + kernel_size[0], w : w + kernel_size[1]] = mask * grad_output[i, j, h // stride[0], w // stride[1]]
++ grad[i, j, h : h + kernel_size[0], w : w + kernel_size[1]] += mask * grad_output[i, j, h // stride[0], w // stride[1]]
+
+ return grad[:, :, padding[0]: height-padding[0], padding[1]: width-padding[1]], None, None, None
+
+",flow/function.py,"ReplaceText(target='+=' @(153,83)->(153,84))","class MaxPool2d(autograd.Function):
+ for h in range(0, height - kernel_size[0] + 1, stride[0]):
+ for w in range(0, width - kernel_size[1] + 1, stride[1]):
+ mask = (data[i, j, h : h + kernel_size[0], w : w + kernel_size[1]] == np.max(data[i, j, h : h + kernel_size[0], w : w + kernel_size[1]]))
+ grad[i, j, h : h + kernel_size[0], w : w + kernel_size[1]] = mask * grad_output[i, j, h // stride[0], w // stride[1]]
+
+ return grad[:, :, padding[0]: height-padding[0], padding[1]: width-padding[1]], None, None, None
+ ","class MaxPool2d(autograd.Function):
+ for h in range(0, height - kernel_size[0] + 1, stride[0]):
+ for w in range(0, width - kernel_size[1] + 1, stride[1]):
+ mask = (data[i, j, h : h + kernel_size[0], w : w + kernel_size[1]] == np.max(data[i, j, h : h + kernel_size[0], w : w + kernel_size[1]]))
+ grad[i, j, h : h + kernel_size[0], w : w + kernel_size[1]] += mask * grad_output[i, j, h // stride[0], w // stride[1]]
+
+ return grad[:, :, padding[0]: height-padding[0], padding[1]: width-padding[1]], None, None, None
+ "
+1630,https://:@github.com/Cjkkkk/Pyflow.git,3ea0e017864bc88327be6752a258de6bafa464d1,"@@ -237,7 +237,7 @@ class View(autograd.Function):
+ @staticmethod
+ def backward(ctx, grad_output):
+ original_shape = ctx.saved_tensors()[0]
+- grad = grad_output.reshape(grad_output)
++ grad = grad_output.reshape(original_shape)
+ return grad
+
+ class LogSoftmax(autograd.Function):
+",flow/function.py,"ReplaceText(target='original_shape' @(240,35)->(240,46))","class View(autograd.Function):
+ @staticmethod
+ def backward(ctx, grad_output):
+ original_shape = ctx.saved_tensors()[0]
+ grad = grad_output.reshape(grad_output)
+ return grad
+
+ class LogSoftmax(autograd.Function):","class View(autograd.Function):
+ @staticmethod
+ def backward(ctx, grad_output):
+ original_shape = ctx.saved_tensors()[0]
+ grad = grad_output.reshape(original_shape)
+ return grad
+
+ class LogSoftmax(autograd.Function):"
+1631,https://:@github.com/trufont/defconQt.git,9ec6c3d4df1c6f708f1d18721774145ea09ff1d9,"@@ -139,7 +139,7 @@ def drawTextAtPoint(painter, text, x, y, scale, xAlign=""left"", yAlign=""bottom"",
+ lines = text.splitlines()
+ lineSpacing = fM.lineSpacing()
+ if xAlign != ""left"" or yAlign != ""bottom"":
+- width = scale * max(fM.width(line) for line in text)
++ width = scale * max(fM.width(line) for line in lines)
+ height = scale * len(lines) * lineSpacing
+ if xAlign == ""center"":
+ x -= width / 2
+",Lib/defconQt/tools/drawing.py,"ReplaceText(target='lines' @(142,55)->(142,59))","def drawTextAtPoint(painter, text, x, y, scale, xAlign=""left"", yAlign=""bottom"",
+ lines = text.splitlines()
+ lineSpacing = fM.lineSpacing()
+ if xAlign != ""left"" or yAlign != ""bottom"":
+ width = scale * max(fM.width(line) for line in text)
+ height = scale * len(lines) * lineSpacing
+ if xAlign == ""center"":
+ x -= width / 2","def drawTextAtPoint(painter, text, x, y, scale, xAlign=""left"", yAlign=""bottom"",
+ lines = text.splitlines()
+ lineSpacing = fM.lineSpacing()
+ if xAlign != ""left"" or yAlign != ""bottom"":
+ width = scale * max(fM.width(line) for line in lines)
+ height = scale * len(lines) * lineSpacing
+ if xAlign == ""center"":
+ x -= width / 2"
+1632,https://:@github.com/ecks0/lura.git,5ad632ce26a1e4469d588e932507e9412ded5182,"@@ -32,7 +32,7 @@ class Pickle(Format):
+ 'Write dict ``data`` as pickle to file ``dst``.'
+
+ with open(dst, mode='wb', encoding=encoding) as fd:
+- self.dumpfd(fd, data)
++ self.dumpfd(data, fd)
+
+ def dumpfd(self, data, fd):
+ 'Write dict ``data`` as pickle to file descriptor ``fd``.'
+",lura/formats/pickle.py,"ArgSwap(idxs=0<->1 @(35,6)->(35,17))","class Pickle(Format):
+ 'Write dict ``data`` as pickle to file ``dst``.'
+
+ with open(dst, mode='wb', encoding=encoding) as fd:
+ self.dumpfd(fd, data)
+
+ def dumpfd(self, data, fd):
+ 'Write dict ``data`` as pickle to file descriptor ``fd``.'","class Pickle(Format):
+ 'Write dict ``data`` as pickle to file ``dst``.'
+
+ with open(dst, mode='wb', encoding=encoding) as fd:
+ self.dumpfd(data, fd)
+
+ def dumpfd(self, data, fd):
+ 'Write dict ``data`` as pickle to file descriptor ``fd``.'"
+1633,https://:@github.com/ecks0/lura.git,e2892f4648ffbc71f815c2d1eef00d55a4d72009,"@@ -51,7 +51,7 @@ class Format:
+ return self.dumpf(patch, path, encoding=encoding)
+ data = self.loadf(path)
+ data_hash = hashs(self.dumps(data))
+- merged = merge(data, patch)
++ merged = merge(patch, data)
+ merged_str = self.dumps(merged)
+ merged_hash = hashs(merged_str)
+ if data_hash == merged_hash:
+",lura/formats/base.py,"ArgSwap(idxs=0<->1 @(54,13)->(54,18))","class Format:
+ return self.dumpf(patch, path, encoding=encoding)
+ data = self.loadf(path)
+ data_hash = hashs(self.dumps(data))
+ merged = merge(data, patch)
+ merged_str = self.dumps(merged)
+ merged_hash = hashs(merged_str)
+ if data_hash == merged_hash:","class Format:
+ return self.dumpf(patch, path, encoding=encoding)
+ data = self.loadf(path)
+ data_hash = hashs(self.dumps(data))
+ merged = merge(patch, data)
+ merged_str = self.dumps(merged)
+ merged_hash = hashs(merged_str)
+ if data_hash == merged_hash:"
+1634,https://:@github.com/a1fred/carnival.git,9abc77bc7908cedfd90d94074f40720e968252f2,"@@ -32,7 +32,7 @@ def get_task_full_name(carnival_tasks_module: str, task_class: Type[Task]) -> st
+
+ task_full_name = f""{task_mod}.{task_name}""
+
+- if task_mod.startswith(f""{carnival_tasks_module}""):
++ if task_full_name.startswith(f""{carnival_tasks_module}""):
+ task_full_name = task_full_name[len(carnival_tasks_module) + 1:]
+
+ return task_full_name
+",carnival/tasks_loader.py,"ReplaceText(target='task_full_name' @(35,7)->(35,15))","def get_task_full_name(carnival_tasks_module: str, task_class: Type[Task]) -> st
+
+ task_full_name = f""{task_mod}.{task_name}""
+
+ if task_mod.startswith(f""{carnival_tasks_module}""):
+ task_full_name = task_full_name[len(carnival_tasks_module) + 1:]
+
+ return task_full_name","def get_task_full_name(carnival_tasks_module: str, task_class: Type[Task]) -> st
+
+ task_full_name = f""{task_mod}.{task_name}""
+
+ if task_full_name.startswith(f""{carnival_tasks_module}""):
+ task_full_name = task_full_name[len(carnival_tasks_module) + 1:]
+
+ return task_full_name"
+1635,https://:@github.com/thimic/twicorder-search.git,9b1abe096a208e9056e52ecccff4ad315e3e7ce9,"@@ -98,7 +98,7 @@ def backfill(path=None, db_name='slpng_giants', collection_name='tweets'):
+ paths = glob.glob(os.path.join(save_dir, '**', '*.t*'), recursive=True)
+ t0 = datetime.now()
+ for idx, path in enumerate(paths):
+- if os.path.basename(os.path.dirname(path)) == 'stream':
++ if os.path.basename(os.path.dirname(path)) != 'stream':
+ continue
+ try:
+ for lidx, line in enumerate(utils.readlines(path)):
+",python/twicorder/mongo.py,"ReplaceText(target='!=' @(101,51)->(101,53))","def backfill(path=None, db_name='slpng_giants', collection_name='tweets'):
+ paths = glob.glob(os.path.join(save_dir, '**', '*.t*'), recursive=True)
+ t0 = datetime.now()
+ for idx, path in enumerate(paths):
+ if os.path.basename(os.path.dirname(path)) == 'stream':
+ continue
+ try:
+ for lidx, line in enumerate(utils.readlines(path)):","def backfill(path=None, db_name='slpng_giants', collection_name='tweets'):
+ paths = glob.glob(os.path.join(save_dir, '**', '*.t*'), recursive=True)
+ t0 = datetime.now()
+ for idx, path in enumerate(paths):
+ if os.path.basename(os.path.dirname(path)) != 'stream':
+ continue
+ try:
+ for lidx, line in enumerate(utils.readlines(path)):"
+1636,https://:@bitbucket.org/Manfre/django-mssql.git,11eaef8b51110a9871846f979a0bce4cf0baad01,"@@ -351,7 +351,7 @@ where
+ """"""
+ cursor.execute(sql,[table_name])
+ for constraint, column in list(cursor.fetchall()):
+- if column not in constraint:
++ if column not in constraints:
+ constraints[constraint] = {
+ ""columns"": [],
+ ""primary_key"": False,
+",sqlserver_ado/introspection.py,"ReplaceText(target='constraints' @(354,29)->(354,39))","where
+ """"""
+ cursor.execute(sql,[table_name])
+ for constraint, column in list(cursor.fetchall()):
+ if column not in constraint:
+ constraints[constraint] = {
+ ""columns"": [],
+ ""primary_key"": False,","where
+ """"""
+ cursor.execute(sql,[table_name])
+ for constraint, column in list(cursor.fetchall()):
+ if column not in constraints:
+ constraints[constraint] = {
+ ""columns"": [],
+ ""primary_key"": False,"
+1637,https://:@github.com/dictget/ecce-homo.git,ffc928d90cb7d938558df8fef15555ec5594ee6d,"@@ -24,7 +24,7 @@ def get_image(filename, **kwargs):
+ return send_from_directory(MEDIA_ROOT, resized_filename)
+
+ if create_image(absolute_path, resized_absolute_path, **kwargs):
+- return send_from_directory(MEDIA_ROOT, resized_absolute_path)
++ return send_from_directory(MEDIA_ROOT, resized_filename)
+ abort(500)
+
+
+",eccehomo/app.py,"ReplaceText(target='resized_filename' @(27,47)->(27,68))","def get_image(filename, **kwargs):
+ return send_from_directory(MEDIA_ROOT, resized_filename)
+
+ if create_image(absolute_path, resized_absolute_path, **kwargs):
+ return send_from_directory(MEDIA_ROOT, resized_absolute_path)
+ abort(500)
+
+ ","def get_image(filename, **kwargs):
+ return send_from_directory(MEDIA_ROOT, resized_filename)
+
+ if create_image(absolute_path, resized_absolute_path, **kwargs):
+ return send_from_directory(MEDIA_ROOT, resized_filename)
+ abort(500)
+
+ "
+1638,https://:@github.com/GEMPACKsoftware/HARPY.git,2f3193f5f588515adffc480f635c4cc147a5bf39,"@@ -198,6 +198,6 @@ class SL4(object):
+ if nshk == nexo:
+ varInd=j
+ else:
+- varInd = shockList.array[j, 0] - 1
++ varInd = shockList.array[shkInd, 0] - 1
+ flatData[varInd] = shockVal.array[shkInd, 0]
+
+",harpy/sl4.py,"ReplaceText(target='shkInd' @(201,45)->(201,46))","class SL4(object):
+ if nshk == nexo:
+ varInd=j
+ else:
+ varInd = shockList.array[j, 0] - 1
+ flatData[varInd] = shockVal.array[shkInd, 0]
+ ","class SL4(object):
+ if nshk == nexo:
+ varInd=j
+ else:
+ varInd = shockList.array[shkInd, 0] - 1
+ flatData[varInd] = shockVal.array[shkInd, 0]
+ "
+1639,https://:@github.com/Dreem-Organization/benderopt.git,7e935344ab04365a98b65778c40c30ffa0a49074,"@@ -4,7 +4,7 @@ import numpy as np
+
+ def validate_categorical(value, values, **kwargs):
+ test = True
+- if value not in value:
++ if value not in values:
+ test = False
+ return test
+
+",benderopt/validation/parameter_value.py,"ReplaceText(target='values' @(7,20)->(7,25))","import numpy as np
+
+ def validate_categorical(value, values, **kwargs):
+ test = True
+ if value not in value:
+ test = False
+ return test
+ ","import numpy as np
+
+ def validate_categorical(value, values, **kwargs):
+ test = True
+ if value not in values:
+ test = False
+ return test
+ "
+1640,https://:@github.com/Dreem-Organization/benderopt.git,b8bf16fd862af629c28d654dcd6c05a21497aa79,"@@ -34,7 +34,7 @@ def validate_lognormal(search_space):
+ raise ValueError(""High bound must be strictly positive"")
+
+ if ""high"" in search_space.keys() and ""low"" in search_space.keys():
+- if search_space[""high""] >= search_space[""low""]:
++ if search_space[""high""] <= search_space[""low""]:
+ raise ValueError(""low <= high"")
+
+ if search_space.get(""base"") and type(search_space.get(""base"")) not in (float, int,):
+",benderopt/validation/lognormal.py,"ReplaceText(target='<=' @(37,32)->(37,34))","def validate_lognormal(search_space):
+ raise ValueError(""High bound must be strictly positive"")
+
+ if ""high"" in search_space.keys() and ""low"" in search_space.keys():
+ if search_space[""high""] >= search_space[""low""]:
+ raise ValueError(""low <= high"")
+
+ if search_space.get(""base"") and type(search_space.get(""base"")) not in (float, int,):","def validate_lognormal(search_space):
+ raise ValueError(""High bound must be strictly positive"")
+
+ if ""high"" in search_space.keys() and ""low"" in search_space.keys():
+ if search_space[""high""] <= search_space[""low""]:
+ raise ValueError(""low <= high"")
+
+ if search_space.get(""base"") and type(search_space.get(""base"")) not in (float, int,):"
+1641,https://:@github.com/umit-iace/tool-pywisp.git,ea8491fda2af3d354e137085365807aa04194128,"@@ -1592,7 +1592,7 @@ class MainGui(QMainWindow):
+ if wid.module == widget.module and wid.parameter == widget.parameter:
+ wid.setValue(float(value))
+ wid.valueOn = value
+- wid.label.setText(wid.widgetName + ': ' + ""{:.3f}"".format(widget.value))
++ wid.label.setText(wid.widgetName + ': ' + ""{:.3f}"".format(wid.value))
+ else:
+ widget.valueOn = value
+ widget.label.setText(widget.widgetName + ': ' + ""{:.3f}"".format(widget.value))
+",pywisp/gui.py,"ReplaceText(target='wid' @(1595,82)->(1595,88))","class MainGui(QMainWindow):
+ if wid.module == widget.module and wid.parameter == widget.parameter:
+ wid.setValue(float(value))
+ wid.valueOn = value
+ wid.label.setText(wid.widgetName + ': ' + ""{:.3f}"".format(widget.value))
+ else:
+ widget.valueOn = value
+ widget.label.setText(widget.widgetName + ': ' + ""{:.3f}"".format(widget.value))","class MainGui(QMainWindow):
+ if wid.module == widget.module and wid.parameter == widget.parameter:
+ wid.setValue(float(value))
+ wid.valueOn = value
+ wid.label.setText(wid.widgetName + ': ' + ""{:.3f}"".format(wid.value))
+ else:
+ widget.valueOn = value
+ widget.label.setText(widget.widgetName + ': ' + ""{:.3f}"".format(widget.value))"
+1642,https://:@github.com/silvacms/Products.SilvaMetadata.git,9ca8b85908725e4413333cc5b42796f1a97a9c7e,"@@ -146,7 +146,7 @@ class ObjectMetadataExporter:
+ if not check(k):
+ continue
+
+- print >> out, ' <%s:%s>%s%s:%s>'%(prefix, k, serialize(v), sid, k)
++ print >> out, ' <%s:%s>%s%s:%s>'%(prefix, k, serialize(v), prefix, k)
+
+ print >> out, ''
+
+",Export.py,"ReplaceText(target='prefix' @(149,82)->(149,85))","class ObjectMetadataExporter:
+ if not check(k):
+ continue
+
+ print >> out, ' <%s:%s>%s%s:%s>'%(prefix, k, serialize(v), sid, k)
+
+ print >> out, ''
+ ","class ObjectMetadataExporter:
+ if not check(k):
+ continue
+
+ print >> out, ' <%s:%s>%s%s:%s>'%(prefix, k, serialize(v), prefix, k)
+
+ print >> out, ''
+ "
+1643,https://:@github.com/softasap/ansible-container.git,44e87c64e477b54f2c9f923a1ad226d1801a8cb1,"@@ -732,7 +732,7 @@ class Engine(BaseEngine):
+ for filename in ['ansible.cfg', 'ansible-requirements.txt',
+ 'requirements.yml']:
+ file_path = os.path.join(source_dir, filename)
+- if os.path.exists(filename):
++ if os.path.exists(file_path):
+ tarball.add(file_path,
+ arcname=os.path.join('build-src', filename))
+ # Make an empty file just to make sure the build-src dir has something
+",container/docker/engine.py,"ReplaceText(target='file_path' @(735,34)->(735,42))","class Engine(BaseEngine):
+ for filename in ['ansible.cfg', 'ansible-requirements.txt',
+ 'requirements.yml']:
+ file_path = os.path.join(source_dir, filename)
+ if os.path.exists(filename):
+ tarball.add(file_path,
+ arcname=os.path.join('build-src', filename))
+ # Make an empty file just to make sure the build-src dir has something","class Engine(BaseEngine):
+ for filename in ['ansible.cfg', 'ansible-requirements.txt',
+ 'requirements.yml']:
+ file_path = os.path.join(source_dir, filename)
+ if os.path.exists(file_path):
+ tarball.add(file_path,
+ arcname=os.path.join('build-src', filename))
+ # Make an empty file just to make sure the build-src dir has something"
+1644,https://:@github.com/softasap/ansible-container.git,3f46ae33bc3a1d2d529b2a4b29e4bc144cbccd77,"@@ -937,7 +937,7 @@ class Engine(BaseEngine, DockerSecretsMixin):
+ container.__version__
+ )
+ if not self.get_image_id_by_tag(conductor_base):
+- conductor_base = 'ansible/%s' % base_image
++ conductor_base = 'ansible/%s' % conductor_base
+ else:
+ conductor_base = 'container-conductor-%s:%s' % (
+ base_image.replace(':', '-'),
+",container/docker/engine.py,"ReplaceText(target='conductor_base' @(940,48)->(940,58))","class Engine(BaseEngine, DockerSecretsMixin):
+ container.__version__
+ )
+ if not self.get_image_id_by_tag(conductor_base):
+ conductor_base = 'ansible/%s' % base_image
+ else:
+ conductor_base = 'container-conductor-%s:%s' % (
+ base_image.replace(':', '-'),","class Engine(BaseEngine, DockerSecretsMixin):
+ container.__version__
+ )
+ if not self.get_image_id_by_tag(conductor_base):
+ conductor_base = 'ansible/%s' % conductor_base
+ else:
+ conductor_base = 'container-conductor-%s:%s' % (
+ base_image.replace(':', '-'),"
+1645,https://:@github.com/Skydipper/Skydipper.git,abd7e5a3a0d4e6f5fdaf2798647adb88c490cd6b,"@@ -557,5 +557,5 @@ class Layer:
+ # confirm update
+
+ # update other layer
+- target_layer.update(update_params=payload, token=token)
++ target_layer.update(update_params=filtered_payload, token=token)
+
+",LMIPy/layer.py,"ReplaceText(target='filtered_payload' @(560,42)->(560,49))","class Layer:
+ # confirm update
+
+ # update other layer
+ target_layer.update(update_params=payload, token=token)
+ ","class Layer:
+ # confirm update
+
+ # update other layer
+ target_layer.update(update_params=filtered_payload, token=token)
+ "
+1646,https://:@github.com/artur-deluca/psopt.git,01d77851c4d96b219af9b1e1dee558128eb7ec69,"@@ -107,7 +107,7 @@ class Optimizer:
+ def _optimize(self):
+
+ start = time.time()
+- if self._n_jobs == 1:
++ if self._n_jobs > 1:
+ pool = multiprocess.Pool(self._n_jobs)
+ else:
+ pool = MockPool()
+",psopt/commons/optimizer.py,"ReplaceText(target='>' @(110,24)->(110,26))","class Optimizer:
+ def _optimize(self):
+
+ start = time.time()
+ if self._n_jobs == 1:
+ pool = multiprocess.Pool(self._n_jobs)
+ else:
+ pool = MockPool()","class Optimizer:
+ def _optimize(self):
+
+ start = time.time()
+ if self._n_jobs > 1:
+ pool = multiprocess.Pool(self._n_jobs)
+ else:
+ pool = MockPool()"
+1647,https://:@github.com/rainwoodman/kdcount.git,b02359b5419fe9e145c4d49e0238d488ac8e656a,"@@ -101,7 +101,7 @@ def bootstrap(nside, rand, nbar, *data):
+ r0 = numpy.concatenate((r0, r), axis=-1)
+ else:
+ heapq.heappush(heap, (a, j, r, d))
+- heapq.heappush(heap, (a0, j, r0, d0))
++ heapq.heappush(heap, (a0, j0, r0, d0))
+
+ for i in range(len(heap)):
+ area, j, r, d = heapq.heappop(heap)
+",kdcount/sphere.py,"ReplaceText(target='j0' @(104,38)->(104,39))","def bootstrap(nside, rand, nbar, *data):
+ r0 = numpy.concatenate((r0, r), axis=-1)
+ else:
+ heapq.heappush(heap, (a, j, r, d))
+ heapq.heappush(heap, (a0, j, r0, d0))
+
+ for i in range(len(heap)):
+ area, j, r, d = heapq.heappop(heap)","def bootstrap(nside, rand, nbar, *data):
+ r0 = numpy.concatenate((r0, r), axis=-1)
+ else:
+ heapq.heappush(heap, (a, j, r, d))
+ heapq.heappush(heap, (a0, j0, r0, d0))
+
+ for i in range(len(heap)):
+ area, j, r, d = heapq.heappop(heap)"
+1648,https://:@github.com/federico123579/Trading212-API.git,1fa06ddf7fd1ed97607a2e2d4d701dfcdcd16490,"@@ -96,7 +96,7 @@ class API(object):
+ self.logger.debug(""logged in"")
+ if mode == ""demo"" and self._elCss(path['alert-box']):
+ self._css(path['alert-box']).click()
+- return 0
++ return 1
+ except Exception:
+ self.logger.critical(""login failed"")
+ return 0
+",tradingAPI/api.py,"ReplaceText(target='1' @(99,19)->(99,20))","class API(object):
+ self.logger.debug(""logged in"")
+ if mode == ""demo"" and self._elCss(path['alert-box']):
+ self._css(path['alert-box']).click()
+ return 0
+ except Exception:
+ self.logger.critical(""login failed"")
+ return 0","class API(object):
+ self.logger.debug(""logged in"")
+ if mode == ""demo"" and self._elCss(path['alert-box']):
+ self._css(path['alert-box']).click()
+ return 1
+ except Exception:
+ self.logger.critical(""login failed"")
+ return 0"
+1649,https://:@github.com/zeburek/cattrs-3.8.git,416f032481f9eca1867a85a0efa989595d7e44bf,"@@ -347,7 +347,7 @@ class Converter(object):
+ # Check the union registry first.
+ handler = self._union_registry.get(union)
+ if handler is not None:
+- return handler(union, obj)
++ return handler(obj, union)
+
+ # Unions with NoneType in them are basically optionals.
+ union_params = union.__args__
+",cattr/converters.py,"ArgSwap(idxs=0<->1 @(350,19)->(350,26))","class Converter(object):
+ # Check the union registry first.
+ handler = self._union_registry.get(union)
+ if handler is not None:
+ return handler(union, obj)
+
+ # Unions with NoneType in them are basically optionals.
+ union_params = union.__args__","class Converter(object):
+ # Check the union registry first.
+ handler = self._union_registry.get(union)
+ if handler is not None:
+ return handler(obj, union)
+
+ # Unions with NoneType in them are basically optionals.
+ union_params = union.__args__"
+1650,https://:@github.com/yaojiach/red-panda.git,cc378fc1ff9ba3303b219e480d42f669db8d271c,"@@ -245,7 +245,7 @@ class RedPanda:
+ {null_option}
+ ignoreheader {ignoreheader}
+ dateformat '{dateformat}'
+- timeformat '{dateformat}'
++ timeformat '{timeformat}'
+ access_key_id '{self.s3_config.get(""aws_access_key_id"")}'
+ secret_access_key '{self.s3_config.get(""aws_secret_access_key"")}'
+ {aws_token_option}
+",red_panda/red_panda.py,"ReplaceText(target='timeformat' @(248,21)->(248,31))","class RedPanda:
+ {null_option}
+ ignoreheader {ignoreheader}
+ dateformat '{dateformat}'
+ timeformat '{dateformat}'
+ access_key_id '{self.s3_config.get(""aws_access_key_id"")}'
+ secret_access_key '{self.s3_config.get(""aws_secret_access_key"")}'
+ {aws_token_option}","class RedPanda:
+ {null_option}
+ ignoreheader {ignoreheader}
+ dateformat '{dateformat}'
+ timeformat '{timeformat}'
+ access_key_id '{self.s3_config.get(""aws_access_key_id"")}'
+ secret_access_key '{self.s3_config.get(""aws_secret_access_key"")}'
+ {aws_token_option}"
+1651,https://:@github.com/anibali/pytorch-stacked-hourglass.git,dc9a7266ed6693f9a835ab411f85fa56e77065a8,"@@ -57,7 +57,7 @@ def draw_gaussian(img, pt, sigma):
+ # Check that any part of the gaussian is in-bounds
+ ul = [int(pt[0] - 3 * sigma), int(pt[1] - 3 * sigma)]
+ br = [int(pt[0] + 3 * sigma + 1), int(pt[1] + 3 * sigma + 1)]
+- if (ul[0] > img.shape[1] or ul[1] >= img.shape[0] or
++ if (ul[0] >= img.shape[1] or ul[1] >= img.shape[0] or
+ br[0] < 0 or br[1] < 0):
+ # If not, just return the image as is
+ return to_torch(img)
+",pose/utils/imutils.py,"ReplaceText(target='>=' @(60,14)->(60,15))","def draw_gaussian(img, pt, sigma):
+ # Check that any part of the gaussian is in-bounds
+ ul = [int(pt[0] - 3 * sigma), int(pt[1] - 3 * sigma)]
+ br = [int(pt[0] + 3 * sigma + 1), int(pt[1] + 3 * sigma + 1)]
+ if (ul[0] > img.shape[1] or ul[1] >= img.shape[0] or
+ br[0] < 0 or br[1] < 0):
+ # If not, just return the image as is
+ return to_torch(img)","def draw_gaussian(img, pt, sigma):
+ # Check that any part of the gaussian is in-bounds
+ ul = [int(pt[0] - 3 * sigma), int(pt[1] - 3 * sigma)]
+ br = [int(pt[0] + 3 * sigma + 1), int(pt[1] + 3 * sigma + 1)]
+ if (ul[0] >= img.shape[1] or ul[1] >= img.shape[0] or
+ br[0] < 0 or br[1] < 0):
+ # If not, just return the image as is
+ return to_torch(img)"
+1652,https://:@github.com/mobiusklein/psims.git,50ffd519e75df03bc268f87d5654e3efd018e0ba,"@@ -26,7 +26,7 @@ def pretty_xml(path, outpath=None, encoding=b'utf-8'):
+ if hasattr(outpath, 'write'):
+ outstream = outpath
+ else:
+- opener = compression.get(outpath)
++ opener = compression.get(path)
+ outstream = opener(outpath, 'wb')
+ with outstream:
+ outstream.write(b'\n')
+",psims/utils.py,"ReplaceText(target='path' @(29,33)->(29,40))","def pretty_xml(path, outpath=None, encoding=b'utf-8'):
+ if hasattr(outpath, 'write'):
+ outstream = outpath
+ else:
+ opener = compression.get(outpath)
+ outstream = opener(outpath, 'wb')
+ with outstream:
+ outstream.write(b'\n')","def pretty_xml(path, outpath=None, encoding=b'utf-8'):
+ if hasattr(outpath, 'write'):
+ outstream = outpath
+ else:
+ opener = compression.get(path)
+ outstream = opener(outpath, 'wb')
+ with outstream:
+ outstream.write(b'\n')"
+1653,https://:@github.com/mobiusklein/psims.git,b93998c7e42ef5ef04c43bd2b0b59a31f01be3a6,"@@ -35,7 +35,7 @@ log.enable()
+
+
+ def differ(a, b):
+- if issubclass(type(a), type(b)):
++ if not issubclass(type(a), type(b)):
+ return False
+ if isinstance(a, dict):
+ return dict_diff(a, b)
+",psims/transform/utils.py,"ReplaceText(target='not ' @(38,7)->(38,7))","log.enable()
+
+
+ def differ(a, b):
+ if issubclass(type(a), type(b)):
+ return False
+ if isinstance(a, dict):
+ return dict_diff(a, b)","log.enable()
+
+
+ def differ(a, b):
+ if not issubclass(type(a), type(b)):
+ return False
+ if isinstance(a, dict):
+ return dict_diff(a, b)"
+1654,https://:@github.com/patchboard/patchboard-py.git,0bd7da5b765f2b87bf92404b3c56c411790b3daa,"@@ -52,7 +52,7 @@ class Action(object):
+ raw = self.patchboard.session.request(
+ self.method,
+ url,
+- args
++ options
+ )
+ response = Response(raw)
+ if response.status != self.success_status:
+",patchboard/action.py,"ReplaceText(target='options' @(55,12)->(55,16))","class Action(object):
+ raw = self.patchboard.session.request(
+ self.method,
+ url,
+ args
+ )
+ response = Response(raw)
+ if response.status != self.success_status:","class Action(object):
+ raw = self.patchboard.session.request(
+ self.method,
+ url,
+ options
+ )
+ response = Response(raw)
+ if response.status != self.success_status:"
+1655,https://:@github.com/quantastica/qiskit-toaster.git,179f1e1ffea7ac084b6d94775ac71f326339894c,"@@ -96,7 +96,7 @@ class ToasterHttpInterface:
+ txt = response.read().decode(""utf8"")
+ break
+
+- return res
++ return txt
+
+ def _fetch_last_response(self, timeout, job_id):
+ req = request.Request(""%s/pollresult/%s"" % (self.toaster_url, job_id))
+",quantastica/qiskit_toaster/ToasterHttpInterface.py,"ReplaceText(target='txt' @(99,15)->(99,18))","class ToasterHttpInterface:
+ txt = response.read().decode(""utf8"")
+ break
+
+ return res
+
+ def _fetch_last_response(self, timeout, job_id):
+ req = request.Request(""%s/pollresult/%s"" % (self.toaster_url, job_id))","class ToasterHttpInterface:
+ txt = response.read().decode(""utf8"")
+ break
+
+ return txt
+
+ def _fetch_last_response(self, timeout, job_id):
+ req = request.Request(""%s/pollresult/%s"" % (self.toaster_url, job_id))"
+1656,https://:@github.com/rcosnita/fantastico.git,0b94c55189d36b41866e822eecc605319f483594,"@@ -43,7 +43,7 @@ class Router(object):
+ if len(conf_loaders) == 0:
+ raise FantasticoNoRoutesError(""No loaders configured."")
+
+- if self._loader_lock is not None and len(self._loaders) == 0:
++ if self._loader_lock is None and len(self._loaders) == 0:
+ self._loader_lock = threading.Lock()
+ self._loaders = []
+
+",fantastico/routing_engine/router.py,"ReplaceText(target=' is ' @(46,28)->(46,36))","class Router(object):
+ if len(conf_loaders) == 0:
+ raise FantasticoNoRoutesError(""No loaders configured."")
+
+ if self._loader_lock is not None and len(self._loaders) == 0:
+ self._loader_lock = threading.Lock()
+ self._loaders = []
+ ","class Router(object):
+ if len(conf_loaders) == 0:
+ raise FantasticoNoRoutesError(""No loaders configured."")
+
+ if self._loader_lock is None and len(self._loaders) == 0:
+ self._loader_lock = threading.Lock()
+ self._loaders = []
+ "
+1657,https://:@github.com/rcosnita/fantastico.git,b64cd9293ff05d184f1a3945b30a0821d8721ff0,"@@ -71,7 +71,7 @@ class SdkCommandActivateExtension(SdkCommand):
+ root_folder = instantiator.get_component_path_data(SettingsFacade().get_config().__class__)[1]
+ comp_root_folder = contrib_path.replace(contrib_path, ""%s%s/%s"" % (root_folder, self._arguments.comp_root, comp_name))
+
+- if os_lib.path.exists(comp_root_folder):
++ if not os_lib.path.exists(comp_root_folder):
+ os_lib.mkdir(comp_root_folder)
+
+ instantiator.scan_folder_by_criteria(
+",fantastico/sdk/commands/command_activate_extension.py,"ReplaceText(target='not ' @(74,11)->(74,11))","class SdkCommandActivateExtension(SdkCommand):
+ root_folder = instantiator.get_component_path_data(SettingsFacade().get_config().__class__)[1]
+ comp_root_folder = contrib_path.replace(contrib_path, ""%s%s/%s"" % (root_folder, self._arguments.comp_root, comp_name))
+
+ if os_lib.path.exists(comp_root_folder):
+ os_lib.mkdir(comp_root_folder)
+
+ instantiator.scan_folder_by_criteria(","class SdkCommandActivateExtension(SdkCommand):
+ root_folder = instantiator.get_component_path_data(SettingsFacade().get_config().__class__)[1]
+ comp_root_folder = contrib_path.replace(contrib_path, ""%s%s/%s"" % (root_folder, self._arguments.comp_root, comp_name))
+
+ if not os_lib.path.exists(comp_root_folder):
+ os_lib.mkdir(comp_root_folder)
+
+ instantiator.scan_folder_by_criteria("
+1658,https://:@github.com/bjherger/auto_dl.git,76c7d4e84069ae0aeeb8a796db40c7c797f81437,"@@ -58,7 +58,7 @@ class TestAutomater(unittest.TestCase):
+ # A single numerical
+ data = {'numerical_vars': ['n1']}
+ input_mapper, output_mapper = Automater()._create_mappers(data)
+- self.assertEqual(1, len(output_mapper.features))
++ self.assertEqual(1, len(input_mapper.features))
+
+ # Two numerical
+ data = {'numerical_vars': ['n1', 'n2']}
+",tests/testautomater.py,"ReplaceText(target='input_mapper' @(61,32)->(61,45))","class TestAutomater(unittest.TestCase):
+ # A single numerical
+ data = {'numerical_vars': ['n1']}
+ input_mapper, output_mapper = Automater()._create_mappers(data)
+ self.assertEqual(1, len(output_mapper.features))
+
+ # Two numerical
+ data = {'numerical_vars': ['n1', 'n2']}","class TestAutomater(unittest.TestCase):
+ # A single numerical
+ data = {'numerical_vars': ['n1']}
+ input_mapper, output_mapper = Automater()._create_mappers(data)
+ self.assertEqual(1, len(input_mapper.features))
+
+ # Two numerical
+ data = {'numerical_vars': ['n1', 'n2']}"
+1659,https://:@github.com/NSLS-II/doct.git,c14ceb3c14d88e2a0f747b5f96ef56260e13832e,"@@ -87,7 +87,7 @@ class Document(dict):
+ try:
+ return vstr(self)
+ except ImportError:
+- return super(self, Document).__str__()
++ return super(Document, self).__str__()
+
+ def to_name_dict_pair(self):
+ """"""Convert to (name, dict) pair
+",doc.py,"ArgSwap(idxs=0<->1 @(90,19)->(90,24))","class Document(dict):
+ try:
+ return vstr(self)
+ except ImportError:
+ return super(self, Document).__str__()
+
+ def to_name_dict_pair(self):
+ """"""Convert to (name, dict) pair","class Document(dict):
+ try:
+ return vstr(self)
+ except ImportError:
+ return super(Document, self).__str__()
+
+ def to_name_dict_pair(self):
+ """"""Convert to (name, dict) pair"
+1660,https://:@github.com/pmrowla/pylivemaker.git,d62510b20bc650220570cbb619cfaf9efb685bd6,"@@ -797,7 +797,7 @@ class LMArchive(object):
+ if self.mode != 'w':
+ raise ValueError('Cannot write to archive opened for reading.')
+ if arcname is None:
+- arcpath = PureWindowsPath(filename)
++ arcpath = PureWindowsPath(packname)
+ else:
+ arcpath = PureWindowsPath(arcname)
+ # strip drive and leading pathsep
+",livemaker/archive.py,"ReplaceText(target='packname' @(800,38)->(800,46))","class LMArchive(object):
+ if self.mode != 'w':
+ raise ValueError('Cannot write to archive opened for reading.')
+ if arcname is None:
+ arcpath = PureWindowsPath(filename)
+ else:
+ arcpath = PureWindowsPath(arcname)
+ # strip drive and leading pathsep","class LMArchive(object):
+ if self.mode != 'w':
+ raise ValueError('Cannot write to archive opened for reading.')
+ if arcname is None:
+ arcpath = PureWindowsPath(packname)
+ else:
+ arcpath = PureWindowsPath(arcname)
+ # strip drive and leading pathsep"
+1661,https://:@github.com/pmrowla/pylivemaker.git,6b562c3a400595dc1da0e467a4c3348365be1333,"@@ -671,7 +671,7 @@ class LMScript(BaseSerializable):
+ for line_no in replacement_choices:
+ try:
+ index, _ = self.get_command(line_no)
+- menu = make_menu(self, line_no)
++ menu = make_menu(self, index)
+ except LiveMakerException:
+ raise BadTextIdentifierError(f""invalid text block: LSB command '{line_no}' is not start of a menu"")
+
+",livemaker/lsb/lmscript.py,"ReplaceText(target='index' @(674,39)->(674,46))","class LMScript(BaseSerializable):
+ for line_no in replacement_choices:
+ try:
+ index, _ = self.get_command(line_no)
+ menu = make_menu(self, line_no)
+ except LiveMakerException:
+ raise BadTextIdentifierError(f""invalid text block: LSB command '{line_no}' is not start of a menu"")
+ ","class LMScript(BaseSerializable):
+ for line_no in replacement_choices:
+ try:
+ index, _ = self.get_command(line_no)
+ menu = make_menu(self, index)
+ except LiveMakerException:
+ raise BadTextIdentifierError(f""invalid text block: LSB command '{line_no}' is not start of a menu"")
+ "
+1662,https://:@github.com/costular/flask-restbolt.git,4dfe49f1de3dfd9598b4ae92b9e6b6644fa999f7,"@@ -338,7 +338,7 @@ class APITestCase(unittest.TestCase):
+ def record(sender, exception):
+ recorded.append(exception)
+
+- got_request_exception.connect(record, api)
++ got_request_exception.connect(record, app)
+ try:
+ with app.test_request_context(""/foo""):
+ api.handle_error(exception)
+",tests/test_api.py,"ReplaceText(target='app' @(341,46)->(341,49))","class APITestCase(unittest.TestCase):
+ def record(sender, exception):
+ recorded.append(exception)
+
+ got_request_exception.connect(record, api)
+ try:
+ with app.test_request_context(""/foo""):
+ api.handle_error(exception)","class APITestCase(unittest.TestCase):
+ def record(sender, exception):
+ recorded.append(exception)
+
+ got_request_exception.connect(record, app)
+ try:
+ with app.test_request_context(""/foo""):
+ api.handle_error(exception)"
+1663,https://:@github.com/chrisrycx/DataBear.git,dc8bf94fea026fd5666be235bafa0cfc613c21fc,"@@ -86,7 +86,7 @@ class dyaconTPH:
+ savedata = []
+ data = self.data[name]
+ for val in data:
+- if (val[0]=enddt):
++ if (val[0]=enddt):
+ savedata.append(val)
+
+ self.data[name] = savedata
+",databear/sensors/dyaconTPH1.py,"ReplaceText(target='or' @(89,32)->(89,35))","class dyaconTPH:
+ savedata = []
+ data = self.data[name]
+ for val in data:
+ if (val[0]=enddt):
+ savedata.append(val)
+
+ self.data[name] = savedata","class dyaconTPH:
+ savedata = []
+ data = self.data[name]
+ for val in data:
+ if (val[0]=enddt):
+ savedata.append(val)
+
+ self.data[name] = savedata"
+1664,https://:@gitlab.com/slumber/replication.git,efb33c3dc01fcd928c2251a42987fc1c69beae41,"@@ -302,7 +302,7 @@ class Session(object):
+ """"""
+ assert(uuid and new_owner)
+
+- if uuid in self._graph.keys() and self._graph[uuid].owner == self._id:
++ if uuid in self._graph.keys() and self._graph[uuid].owner != self._id:
+ for node in self._node_deps(node=uuid):
+ self.change_owner(uuid=node,new_owner=new_owner)
+
+",replication/interface.py,"ReplaceText(target='!=' @(305,66)->(305,68))","class Session(object):
+ """"""
+ assert(uuid and new_owner)
+
+ if uuid in self._graph.keys() and self._graph[uuid].owner == self._id:
+ for node in self._node_deps(node=uuid):
+ self.change_owner(uuid=node,new_owner=new_owner)
+ ","class Session(object):
+ """"""
+ assert(uuid and new_owner)
+
+ if uuid in self._graph.keys() and self._graph[uuid].owner != self._id:
+ for node in self._node_deps(node=uuid):
+ self.change_owner(uuid=node,new_owner=new_owner)
+ "
+1665,https://:@github.com/akrog/ember-csi.git,4fc79e94918db66a40c319fa4497575bca633f4b,"@@ -561,7 +561,7 @@ class NodeBase(IdentityBase):
+ if persistence_config:
+ cinderlib_extra_config = ember_config.copy()
+ cinderlib_extra_config.pop('disabled')
+- ember_config['fail_on_missing_backend'] = False
++ cinderlib_extra_config['fail_on_missing_backend'] = False
+ cinderlib.setup(persistence_config=persistence_config,
+ **cinderlib_extra_config)
+ IdentityBase.__init__(self, server, ember_config)
+",ember_csi/base.py,"ReplaceText(target='cinderlib_extra_config' @(564,12)->(564,24))","class NodeBase(IdentityBase):
+ if persistence_config:
+ cinderlib_extra_config = ember_config.copy()
+ cinderlib_extra_config.pop('disabled')
+ ember_config['fail_on_missing_backend'] = False
+ cinderlib.setup(persistence_config=persistence_config,
+ **cinderlib_extra_config)
+ IdentityBase.__init__(self, server, ember_config)","class NodeBase(IdentityBase):
+ if persistence_config:
+ cinderlib_extra_config = ember_config.copy()
+ cinderlib_extra_config.pop('disabled')
+ cinderlib_extra_config['fail_on_missing_backend'] = False
+ cinderlib.setup(persistence_config=persistence_config,
+ **cinderlib_extra_config)
+ IdentityBase.__init__(self, server, ember_config)"
+1666,https://:@github.com/akrog/ember-csi.git,52a690250873a10850e51ca9ee1a6fe90f6847f1,"@@ -305,7 +305,7 @@ class ControllerBase(IdentityBase):
+ cinderlib_extra_config = ember_config.copy()
+ cinderlib_extra_config.pop('disabled')
+ cinderlib.setup(persistence_config=persistence_config,
+- **ember_config)
++ **cinderlib_extra_config)
+ self.backend = cinderlib.Backend(**backend_config)
+ IdentityBase.__init__(self, server, ember_config)
+ self.CSI.add_ControllerServicer_to_server(self, server)
+",ember_csi/base.py,"ReplaceText(target='cinderlib_extra_config' @(308,26)->(308,38))","class ControllerBase(IdentityBase):
+ cinderlib_extra_config = ember_config.copy()
+ cinderlib_extra_config.pop('disabled')
+ cinderlib.setup(persistence_config=persistence_config,
+ **ember_config)
+ self.backend = cinderlib.Backend(**backend_config)
+ IdentityBase.__init__(self, server, ember_config)
+ self.CSI.add_ControllerServicer_to_server(self, server)","class ControllerBase(IdentityBase):
+ cinderlib_extra_config = ember_config.copy()
+ cinderlib_extra_config.pop('disabled')
+ cinderlib.setup(persistence_config=persistence_config,
+ **cinderlib_extra_config)
+ self.backend = cinderlib.Backend(**backend_config)
+ IdentityBase.__init__(self, server, ember_config)
+ self.CSI.add_ControllerServicer_to_server(self, server)"
+1667,https://:@github.com/guysv/ilua.git,d433be2f47da572bef7ca39ce15a1e6b59aeecd2,"@@ -110,7 +110,7 @@ class ILuaKernel(KernelBase):
+ ""payload"": code})
+
+ if result[""payload""][""success""]:
+- if result['payload']['returned'] == """" and not silent:
++ if result['payload']['returned'] != """" and not silent:
+ self.send_update(""execute_result"", {
+ 'execution_count': self.execution_count,
+ 'data': {
+",ilua/kernel.py,"ReplaceText(target='!=' @(113,45)->(113,47))","class ILuaKernel(KernelBase):
+ ""payload"": code})
+
+ if result[""payload""][""success""]:
+ if result['payload']['returned'] == """" and not silent:
+ self.send_update(""execute_result"", {
+ 'execution_count': self.execution_count,
+ 'data': {","class ILuaKernel(KernelBase):
+ ""payload"": code})
+
+ if result[""payload""][""success""]:
+ if result['payload']['returned'] != """" and not silent:
+ self.send_update(""execute_result"", {
+ 'execution_count': self.execution_count,
+ 'data': {"
+1668,https://:@github.com/guysv/ilua.git,c7532fb945aa964e4eedff2ec0d5f90e96d7ca13,"@@ -94,7 +94,7 @@ class Win32NamedPipe(abstract.FileDescriptor):
+
+ def writeSequence(self, data):
+ for chunk in data:
+- self.write(data)
++ self.write(chunk)
+
+ def pipeWrite(self):
+ try:
+",ilua/_win32namedpipe.py,"ReplaceText(target='chunk' @(97,23)->(97,27))","class Win32NamedPipe(abstract.FileDescriptor):
+
+ def writeSequence(self, data):
+ for chunk in data:
+ self.write(data)
+
+ def pipeWrite(self):
+ try:","class Win32NamedPipe(abstract.FileDescriptor):
+
+ def writeSequence(self, data):
+ for chunk in data:
+ self.write(chunk)
+
+ def pipeWrite(self):
+ try:"
+1669,https://:@bitbucket.org/jairhul/pyg4ometry.git,3627d9e0b48c213bddb00de3750b0f28c71eaa8b,"@@ -60,7 +60,7 @@ class EllipticalCone(_SolidBase) :
+ n = d
+ else:
+ n = _Vector(norm)
+- vertices.append(_Vertex(c.plus(d), d))
++ vertices.append(_Vertex(c.plus(d), n))
+
+
+ for j0 in range(slices):
+",geant4/solid/EllipticalCone.py,"ReplaceText(target='n' @(63,47)->(63,48))","class EllipticalCone(_SolidBase) :
+ n = d
+ else:
+ n = _Vector(norm)
+ vertices.append(_Vertex(c.plus(d), d))
+
+
+ for j0 in range(slices):","class EllipticalCone(_SolidBase) :
+ n = d
+ else:
+ n = _Vector(norm)
+ vertices.append(_Vertex(c.plus(d), n))
+
+
+ for j0 in range(slices):"
+1670,https://:@bitbucket.org/jairhul/pyg4ometry.git,12f7b6ffabc83cc931529e55ae1adb33a8207696,"@@ -32,7 +32,7 @@ class Scaled(_SolidBase):
+ self.varNames = [""pX"", ""pY"", ""pZ""]
+ self.dependents = []
+
+- if registry:
++ if addRegistry:
+ registry.addSolid(self)
+
+ self.registry = registry
+",pyg4ometry/geant4/solid/Scaled.py,"ReplaceText(target='addRegistry' @(35,11)->(35,19))","class Scaled(_SolidBase):
+ self.varNames = [""pX"", ""pY"", ""pZ""]
+ self.dependents = []
+
+ if registry:
+ registry.addSolid(self)
+
+ self.registry = registry","class Scaled(_SolidBase):
+ self.varNames = [""pX"", ""pY"", ""pZ""]
+ self.dependents = []
+
+ if addRegistry:
+ registry.addSolid(self)
+
+ self.registry = registry"
+1671,https://:@bitbucket.org/jairhul/pyg4ometry.git,e6a4a4fd0df7b10f548a5553ba2bdf63e661c0f1,"@@ -41,7 +41,7 @@ def Test(vis = False, interactive = False, type = normal) :
+
+ # solids
+ ws = _g4.solid.Box(""ws"",wx,wy,wz, reg, ""mm"")
+- ps = _g4.solid.GenericPolyhedra(""ps"",psphi,pdphi,pnsid,pz,pr,reg,""mm"",""rad"")
++ ps = _g4.solid.GenericPolyhedra(""ps"",psphi,pdphi,pnsid,pr,pz,reg,""mm"",""rad"")
+
+ # structure
+ wl = _g4.LogicalVolume(ws, wm, ""wl"", reg)
+",pyg4ometry/test/pythonGeant4/T014_GenericPolyhedra.py,"ArgSwap(idxs=4<->5 @(44,9)->(44,35))","def Test(vis = False, interactive = False, type = normal) :
+
+ # solids
+ ws = _g4.solid.Box(""ws"",wx,wy,wz, reg, ""mm"")
+ ps = _g4.solid.GenericPolyhedra(""ps"",psphi,pdphi,pnsid,pz,pr,reg,""mm"",""rad"")
+
+ # structure
+ wl = _g4.LogicalVolume(ws, wm, ""wl"", reg)","def Test(vis = False, interactive = False, type = normal) :
+
+ # solids
+ ws = _g4.solid.Box(""ws"",wx,wy,wz, reg, ""mm"")
+ ps = _g4.solid.GenericPolyhedra(""ps"",psphi,pdphi,pnsid,pr,pz,reg,""mm"",""rad"")
+
+ # structure
+ wl = _g4.LogicalVolume(ws, wm, ""wl"", reg)"
+1672,https://:@github.com/fineartdev/superset.git,299ad095760f1ed6d1f43549a4c979df508bd624,"@@ -926,7 +926,7 @@ class Datasource(Model, AuditMixinNullable, Queryable):
+ cols += ['timestamp']
+ cols += [col for col in groupby if col in df.columns]
+ cols += [col for col in metrics if col in df.columns]
+- cols += [col for col in df.columns if col in cols]
++ cols += [col for col in df.columns if col not in cols]
+ df = df[cols]
+ return QueryResult(
+ df=df,
+",panoramix/models.py,"ReplaceText(target=' not in ' @(929,49)->(929,53))","class Datasource(Model, AuditMixinNullable, Queryable):
+ cols += ['timestamp']
+ cols += [col for col in groupby if col in df.columns]
+ cols += [col for col in metrics if col in df.columns]
+ cols += [col for col in df.columns if col in cols]
+ df = df[cols]
+ return QueryResult(
+ df=df,","class Datasource(Model, AuditMixinNullable, Queryable):
+ cols += ['timestamp']
+ cols += [col for col in groupby if col in df.columns]
+ cols += [col for col in metrics if col in df.columns]
+ cols += [col for col in df.columns if col not in cols]
+ df = df[cols]
+ return QueryResult(
+ df=df,"
+1673,https://:@github.com/fineartdev/superset.git,efaef8fe0924ff39e77edbe8fe5e2ed337adccf3,"@@ -628,7 +628,7 @@ class Database(Model, AuditMixinNullable):
+ self, 'table', force=force)
+ return tables_dict.get("""", [])
+ return sorted(
+- self.db_engine_spec.get_table_names(self.inspector, schema))
++ self.db_engine_spec.get_table_names(schema, self.inspector))
+
+ def all_view_names(self, schema=None, force=False):
+ if not schema:
+",superset/models/core.py,"ArgSwap(idxs=0<->1 @(631,12)->(631,47))","class Database(Model, AuditMixinNullable):
+ self, 'table', force=force)
+ return tables_dict.get("""", [])
+ return sorted(
+ self.db_engine_spec.get_table_names(self.inspector, schema))
+
+ def all_view_names(self, schema=None, force=False):
+ if not schema:","class Database(Model, AuditMixinNullable):
+ self, 'table', force=force)
+ return tables_dict.get("""", [])
+ return sorted(
+ self.db_engine_spec.get_table_names(schema, self.inspector))
+
+ def all_view_names(self, schema=None, force=False):
+ if not schema:"
+1674,https://:@github.com/lucas-flowers/snutree.git,9eb126d822088e241c8c42c58d792919f698c25b,"@@ -209,7 +209,7 @@ def compile_pdf(source):
+ )
+ except OSError as exception:
+ msg = f'had a problem compiling to PDF:\n{exception}'
+- raise SnutreeError(exception)
++ raise SnutreeError(msg)
+
+ return result.stdout
+
+",snutree/snutree.py,"ReplaceText(target='msg' @(212,27)->(212,36))","def compile_pdf(source):
+ )
+ except OSError as exception:
+ msg = f'had a problem compiling to PDF:\n{exception}'
+ raise SnutreeError(exception)
+
+ return result.stdout
+ ","def compile_pdf(source):
+ )
+ except OSError as exception:
+ msg = f'had a problem compiling to PDF:\n{exception}'
+ raise SnutreeError(msg)
+
+ return result.stdout
+ "
+1675,https://:@github.com/Nanco-L/simple-nn.git,c5fb2c51f0304d630addad93be0c206be54ce93e,"@@ -569,7 +569,7 @@ class Neural_network(object):
+ test_save['DFT_F'].append(test_elem['F'])
+ test_save['NN_F'].append(tmp_nnf)
+
+- test_tot_struc += num_batch_atom
++ test_tot_atom += num_batch_atom
+ else:
+ test_elem, tmp_nne, tmp_eloss = \
+ sess.run([self.next_elem, self.E, self.e_loss], feed_dict=test_fdict)
+",simple_nn/models/neural_network.py,"ReplaceText(target='test_tot_atom' @(572,28)->(572,42))","class Neural_network(object):
+ test_save['DFT_F'].append(test_elem['F'])
+ test_save['NN_F'].append(tmp_nnf)
+
+ test_tot_struc += num_batch_atom
+ else:
+ test_elem, tmp_nne, tmp_eloss = \
+ sess.run([self.next_elem, self.E, self.e_loss], feed_dict=test_fdict)","class Neural_network(object):
+ test_save['DFT_F'].append(test_elem['F'])
+ test_save['NN_F'].append(tmp_nnf)
+
+ test_tot_atom += num_batch_atom
+ else:
+ test_elem, tmp_nne, tmp_eloss = \
+ sess.run([self.next_elem, self.E, self.e_loss], feed_dict=test_fdict)"
+1676,https://:@github.com/Nanco-L/simple-nn.git,394b60e6ad7c24579dac407adbf0078b48cdcb89,"@@ -390,7 +390,7 @@ class Symmetry_function(object):
+ self._write_tfrecords(tmp_res, writer, use_force=use_force, atomic_weights=aw_tag)
+
+ if not self.inputs['remain_pickle']:
+- os.remove(item)
++ os.remove(ptem)
+
+ writer.close()
+ self.parent.logfile.write('{} file saved in {}\n'.format((i%self.inputs['data_per_tfrecord'])+1, record_name))
+",simple_nn/features/symmetry_function/__init__.py,"ReplaceText(target='ptem' @(393,30)->(393,34))","class Symmetry_function(object):
+ self._write_tfrecords(tmp_res, writer, use_force=use_force, atomic_weights=aw_tag)
+
+ if not self.inputs['remain_pickle']:
+ os.remove(item)
+
+ writer.close()
+ self.parent.logfile.write('{} file saved in {}\n'.format((i%self.inputs['data_per_tfrecord'])+1, record_name))","class Symmetry_function(object):
+ self._write_tfrecords(tmp_res, writer, use_force=use_force, atomic_weights=aw_tag)
+
+ if not self.inputs['remain_pickle']:
+ os.remove(ptem)
+
+ writer.close()
+ self.parent.logfile.write('{} file saved in {}\n'.format((i%self.inputs['data_per_tfrecord'])+1, record_name))"
+1677,https://:@gitlab.com/dhke/py-exim-utils.git,707d1de5e000094a0f277960fb35190ad3d65ddf,"@@ -324,7 +324,7 @@ class LFileParser(object):
+ source_name = source_name or s
+ intermediate_encoding = intermediate_encoding or 'utf-8'
+ source = s.encode(intermediate_encoding)
+- return self.parse_bytes(source, source_name=s)
++ return self.parse_bytes(source, source_name=source_name)
+
+ def parse_comment(self, context):
+ token = LFileParserToken('comment', None, context.lineno)
+",src/exim/db/lsearch.py,"ReplaceText(target='source_name' @(327,52)->(327,53))","class LFileParser(object):
+ source_name = source_name or s
+ intermediate_encoding = intermediate_encoding or 'utf-8'
+ source = s.encode(intermediate_encoding)
+ return self.parse_bytes(source, source_name=s)
+
+ def parse_comment(self, context):
+ token = LFileParserToken('comment', None, context.lineno)","class LFileParser(object):
+ source_name = source_name or s
+ intermediate_encoding = intermediate_encoding or 'utf-8'
+ source = s.encode(intermediate_encoding)
+ return self.parse_bytes(source, source_name=source_name)
+
+ def parse_comment(self, context):
+ token = LFileParserToken('comment', None, context.lineno)"
+1678,https://:@gitlab.com/abompard/rhizom.git,18cb3b4727aa3731289879c0187be8ac3f77c212,"@@ -37,7 +37,7 @@ def upgrade():
+ creation=datetime.utcnow(), last_access=datetime.utcnow()))
+ conn.execute(users_table.update().values(
+ creation=datetime.utcnow(), last_connection=datetime.utcnow()))
+- if is_sqlite(conn):
++ if not is_sqlite(conn):
+ op.alter_column('graphs', 'creation', nullable=False)
+ op.alter_column('graphs', 'last_access', nullable=False)
+ op.alter_column('users', 'creation', nullable=False)
+",rhizom/migrations/versions/b331d042fca_creation_and_access_times.py,"ReplaceText(target='not ' @(40,7)->(40,7))","def upgrade():
+ creation=datetime.utcnow(), last_access=datetime.utcnow()))
+ conn.execute(users_table.update().values(
+ creation=datetime.utcnow(), last_connection=datetime.utcnow()))
+ if is_sqlite(conn):
+ op.alter_column('graphs', 'creation', nullable=False)
+ op.alter_column('graphs', 'last_access', nullable=False)
+ op.alter_column('users', 'creation', nullable=False)","def upgrade():
+ creation=datetime.utcnow(), last_access=datetime.utcnow()))
+ conn.execute(users_table.update().values(
+ creation=datetime.utcnow(), last_connection=datetime.utcnow()))
+ if not is_sqlite(conn):
+ op.alter_column('graphs', 'creation', nullable=False)
+ op.alter_column('graphs', 'last_access', nullable=False)
+ op.alter_column('users', 'creation', nullable=False)"
+1679,https://:@github.com/frenzymadness/compileall2.git,59df6aeae3eb4a67c3fa783c403cea81def8a557,"@@ -104,8 +104,8 @@ class CompileallTestsBase:
+ self.source_path3 = os.path.join(self.subdirectory, '_test3.py')
+ shutil.copyfile(self.source_path, self.source_path3)
+ many_directories = [str(number) for number in range(1, 100)]
+- self.long_path = os.path.join(""long"",
+- self.directory,
++ self.long_path = os.path.join(self.directory,
++ ""long"",
+ *many_directories)
+ os.makedirs(self.long_path)
+ self.source_path_long = os.path.join(self.long_path, '_test4.py')
+",test_compileall_original.py,"ArgSwap(idxs=0<->1 @(107,25)->(107,37))","class CompileallTestsBase:
+ self.source_path3 = os.path.join(self.subdirectory, '_test3.py')
+ shutil.copyfile(self.source_path, self.source_path3)
+ many_directories = [str(number) for number in range(1, 100)]
+ self.long_path = os.path.join(""long"",
+ self.directory,
+ *many_directories)
+ os.makedirs(self.long_path)
+ self.source_path_long = os.path.join(self.long_path, '_test4.py')","class CompileallTestsBase:
+ self.source_path3 = os.path.join(self.subdirectory, '_test3.py')
+ shutil.copyfile(self.source_path, self.source_path3)
+ many_directories = [str(number) for number in range(1, 100)]
+ self.long_path = os.path.join(self.directory,
+ ""long"",
+ *many_directories)
+ os.makedirs(self.long_path)
+ self.source_path_long = os.path.join(self.long_path, '_test4.py')"
+1680,https://:@github.com/nandoflorestan/keepluggable.git,576d342dc8a5f8d4c20d780766b556ca6c91935e,"@@ -274,6 +274,6 @@ class ImageAction(BaseFilesAction):
+ """"""Omit the main *href* if we are not storing original images.""""""
+ metadata = super()._complement(metadata)
+ # Add main *href* if we are storing original images or if not image
+- if metadata.get('image_width') or not self.config.store_original:
++ if not metadata.get('image_width') or not self.config.store_original:
+ del metadata['href']
+ return metadata
+",keepluggable/image_actions.py,"ReplaceText(target='not ' @(277,11)->(277,11))","class ImageAction(BaseFilesAction):
+ """"""Omit the main *href* if we are not storing original images.""""""
+ metadata = super()._complement(metadata)
+ # Add main *href* if we are storing original images or if not image
+ if metadata.get('image_width') or not self.config.store_original:
+ del metadata['href']
+ return metadata","class ImageAction(BaseFilesAction):
+ """"""Omit the main *href* if we are not storing original images.""""""
+ metadata = super()._complement(metadata)
+ # Add main *href* if we are storing original images or if not image
+ if not metadata.get('image_width') or not self.config.store_original:
+ del metadata['href']
+ return metadata"
+1681,https://:@github.com/rocksclusters/FingerPrint.git,ab31be4ea3ac33422656d36d635e30c0e9235757,"@@ -44,7 +44,7 @@ class Swirl(object):
+ p = os.readlink(fileName)
+ if not os.path.isabs(p):
+ p = os.path.join( os.path.dirname(fileName), p)
+- links.append(p)
++ links.append(fileName)
+ fileName = p
+ for swirlFile in self.swirlFiles:
+ if swirlFile.path == fileName:
+",FingerPrint/swirl.py,"ReplaceText(target='fileName' @(47,25)->(47,26))","class Swirl(object):
+ p = os.readlink(fileName)
+ if not os.path.isabs(p):
+ p = os.path.join( os.path.dirname(fileName), p)
+ links.append(p)
+ fileName = p
+ for swirlFile in self.swirlFiles:
+ if swirlFile.path == fileName:","class Swirl(object):
+ p = os.readlink(fileName)
+ if not os.path.isabs(p):
+ p = os.path.join( os.path.dirname(fileName), p)
+ links.append(fileName)
+ fileName = p
+ for swirlFile in self.swirlFiles:
+ if swirlFile.path == fileName:"
+1682,https://:@github.com/all-umass/superman.git,2431684dc60312c6bba81f940511c5f608b696a3,"@@ -36,7 +36,7 @@ def crop_resample(bands, intensities, crops):
+ # check that each chunk is valid and doesn't overlap with any other
+ prev_ub = float('-inf')
+ for lb, ub, step in crops:
+- if ub >= lb:
++ if ub <= lb:
+ raise ValueError('Invalid crop region')
+ if lb < prev_ub:
+ raise ValueError('Overlapping crop regions')
+",superman/preprocess.py,"ReplaceText(target='<=' @(39,10)->(39,12))","def crop_resample(bands, intensities, crops):
+ # check that each chunk is valid and doesn't overlap with any other
+ prev_ub = float('-inf')
+ for lb, ub, step in crops:
+ if ub >= lb:
+ raise ValueError('Invalid crop region')
+ if lb < prev_ub:
+ raise ValueError('Overlapping crop regions')","def crop_resample(bands, intensities, crops):
+ # check that each chunk is valid and doesn't overlap with any other
+ prev_ub = float('-inf')
+ for lb, ub, step in crops:
+ if ub <= lb:
+ raise ValueError('Invalid crop region')
+ if lb < prev_ub:
+ raise ValueError('Overlapping crop regions')"
+1683,https://:@github.com/jvamvas/rhymediscovery.git,74b6c37b1a8ddae99edbf14a6db7307d00437734,"@@ -127,7 +127,7 @@ def post_prob_scheme(t_table, words, stanza, scheme):
+ for i, w in enumerate(rhymelist):
+ r = words.index(w)
+ if i == 0: # first word, use P(w|x)
+- myprob = t_table[r, n]
++ myprob *= t_table[r, n]
+ else:
+ for v in rhymelist[:i]: # history
+ c = words.index(v)
+",findschemes.py,"ReplaceText(target='*=' @(130,23)->(130,24))","def post_prob_scheme(t_table, words, stanza, scheme):
+ for i, w in enumerate(rhymelist):
+ r = words.index(w)
+ if i == 0: # first word, use P(w|x)
+ myprob = t_table[r, n]
+ else:
+ for v in rhymelist[:i]: # history
+ c = words.index(v)","def post_prob_scheme(t_table, words, stanza, scheme):
+ for i, w in enumerate(rhymelist):
+ r = words.index(w)
+ if i == 0: # first word, use P(w|x)
+ myprob *= t_table[r, n]
+ else:
+ for v in rhymelist[:i]: # history
+ c = words.index(v)"
+1684,https://:@github.com/bensondaled/pyfluo.git,a9e2640fe3e0316dba2917dfbf9bd01d43afd1ce,"@@ -175,7 +175,7 @@ class Movie(TSBase):
+ roi_flat = roi3.reshape((len(roi3),-1))
+ self_flat = self.reshape((len(self),-1)).T
+ dp = (roi_flat.dot(self_flat)).T
+- return Trace(dp/len(self_flat), time=self.time, Ts=self.Ts)
++ return Trace(dp/len(roi_flat), time=self.time, Ts=self.Ts)
+
+ def motion_correct(self, *params, **kwargs):
+ """"""A convenience method for pyfluo.motion.motion_correct
+",pyfluo/movies.py,"ReplaceText(target='roi_flat' @(178,28)->(178,37))","class Movie(TSBase):
+ roi_flat = roi3.reshape((len(roi3),-1))
+ self_flat = self.reshape((len(self),-1)).T
+ dp = (roi_flat.dot(self_flat)).T
+ return Trace(dp/len(self_flat), time=self.time, Ts=self.Ts)
+
+ def motion_correct(self, *params, **kwargs):
+ """"""A convenience method for pyfluo.motion.motion_correct","class Movie(TSBase):
+ roi_flat = roi3.reshape((len(roi3),-1))
+ self_flat = self.reshape((len(self),-1)).T
+ dp = (roi_flat.dot(self_flat)).T
+ return Trace(dp/len(roi_flat), time=self.time, Ts=self.Ts)
+
+ def motion_correct(self, *params, **kwargs):
+ """"""A convenience method for pyfluo.motion.motion_correct"
+1685,https://:@github.com/wkschwartz/wrapitup.git,6d13bf58cc29d07edcf5e86221cd676a81a04776,"@@ -180,7 +180,7 @@ class catch_signals:
+ 'callback is not a callable with two positional arguments: %r' %
+ (callback,))
+ if os.name == 'nt':
+- if not (set(signals) <= set(self._DEFAULT_SIGS)):
++ if not (set(signals_tmp) <= set(self._DEFAULT_SIGS)):
+ raise ValueError(
+ ""Windows does not support one of the signals: %r"" % (signals,))
+ self._signals = tuple(signals_tmp) # type: typing.Tuple[signal.Signals, ...]
+",wrapitup/_catch_signals.py,"ReplaceText(target='signals_tmp' @(183,15)->(183,22))","class catch_signals:
+ 'callback is not a callable with two positional arguments: %r' %
+ (callback,))
+ if os.name == 'nt':
+ if not (set(signals) <= set(self._DEFAULT_SIGS)):
+ raise ValueError(
+ ""Windows does not support one of the signals: %r"" % (signals,))
+ self._signals = tuple(signals_tmp) # type: typing.Tuple[signal.Signals, ...]","class catch_signals:
+ 'callback is not a callable with two positional arguments: %r' %
+ (callback,))
+ if os.name == 'nt':
+ if not (set(signals_tmp) <= set(self._DEFAULT_SIGS)):
+ raise ValueError(
+ ""Windows does not support one of the signals: %r"" % (signals,))
+ self._signals = tuple(signals_tmp) # type: typing.Tuple[signal.Signals, ...]"
+1686,https://:@github.com/hugobessa/django-shared-schema-tenants.git,0438cf26353f4b6955f9c7e62e2a37e71b05f019,"@@ -2,7 +2,7 @@ from django.contrib.sites.models import Site
+ from shared_schema_tenants.settings import DEFAULT_SITE_DOMAIN
+
+ def creates_default_site(sender, instance, created, *args, **kwargs):
+- if created:
++ if not created:
+ try:
+ site = Site.objects.get(domain__icontains=DEFAULT_SITE_DOMAIN,
+ tenant_site__tenant=instance)
+",shared_schema_tenants/signals.py,"ReplaceText(target='not ' @(5,7)->(5,7))","from django.contrib.sites.models import Site
+ from shared_schema_tenants.settings import DEFAULT_SITE_DOMAIN
+
+ def creates_default_site(sender, instance, created, *args, **kwargs):
+ if created:
+ try:
+ site = Site.objects.get(domain__icontains=DEFAULT_SITE_DOMAIN,
+ tenant_site__tenant=instance)","from django.contrib.sites.models import Site
+ from shared_schema_tenants.settings import DEFAULT_SITE_DOMAIN
+
+ def creates_default_site(sender, instance, created, *args, **kwargs):
+ if not created:
+ try:
+ site = Site.objects.get(domain__icontains=DEFAULT_SITE_DOMAIN,
+ tenant_site__tenant=instance)"
+1687,https://:@github.com/pmichel31415/dynn.git,d17306ada100763a7b72fe7bc5bd6bc3bbb5ae13,"@@ -121,5 +121,5 @@ class CompactLSTM(layers.Layer):
+ else:
+ gates = dy.vanilla_lstm_gates(x,h,self.Whx, self.Whh,self.bh)
+ new_c = dy.vanilla_lstm_c(c, gates)
+- new_h = dy.vanilla_lstm_h(c, gates)
++ new_h = dy.vanilla_lstm_h(new_c, gates)
+ return new_h, new_c
+\ No newline at end of file
+",lstm.py,"ReplaceText(target='new_c' @(124,34)->(124,35))","class CompactLSTM(layers.Layer):
+ else:
+ gates = dy.vanilla_lstm_gates(x,h,self.Whx, self.Whh,self.bh)
+ new_c = dy.vanilla_lstm_c(c, gates)
+ new_h = dy.vanilla_lstm_h(c, gates)
+ return new_h, new_c
+\ No newline at end of file","class CompactLSTM(layers.Layer):
+ else:
+ gates = dy.vanilla_lstm_gates(x,h,self.Whx, self.Whh,self.bh)
+ new_c = dy.vanilla_lstm_c(c, gates)
+ new_h = dy.vanilla_lstm_h(new_c, gates)
+ return new_h, new_c
+\ No newline at end of file"
+1688,https://:@github.com/pmichel31415/dynn.git,644f1b8a3e59e8855ac04417290c2172c2b5fa88,"@@ -146,7 +146,7 @@ def _test_recurrent_layer_bidirectional_transduction(
+ dy.esum([dy.sum_elems(state[0]) for state in fwd_states])
+ )
+ bwd_z = dy.mean_batches(
+- dy.esum([dy.sum_elems(state[0]) for state in fwd_states])
++ dy.esum([dy.sum_elems(state[0]) for state in bwd_states])
+ )
+ z = fwd_z + bwd_z
+ z.forward()
+",tests/layers/test_transduction_layers.py,"ReplaceText(target='bwd_states' @(149,53)->(149,63))","def _test_recurrent_layer_bidirectional_transduction(
+ dy.esum([dy.sum_elems(state[0]) for state in fwd_states])
+ )
+ bwd_z = dy.mean_batches(
+ dy.esum([dy.sum_elems(state[0]) for state in fwd_states])
+ )
+ z = fwd_z + bwd_z
+ z.forward()","def _test_recurrent_layer_bidirectional_transduction(
+ dy.esum([dy.sum_elems(state[0]) for state in fwd_states])
+ )
+ bwd_z = dy.mean_batches(
+ dy.esum([dy.sum_elems(state[0]) for state in bwd_states])
+ )
+ z = fwd_z + bwd_z
+ z.forward()"
+1689,https://:@github.com/drachlyznardh/githistorian.git,f1a798d26572977769f2d02ece24cf0ed35170b1,"@@ -44,6 +44,6 @@ class NodeDB:
+ result = []
+ for name in names:
+ target = self.store[name]
+- if target.has_column() and target.column <= column: continue
++ if target.has_column() and target.column < column: continue
+ result.append(target.row)
+ return result
+",db.py,"ReplaceText(target='<' @(47,44)->(47,46))","class NodeDB:
+ result = []
+ for name in names:
+ target = self.store[name]
+ if target.has_column() and target.column <= column: continue
+ result.append(target.row)
+ return result","class NodeDB:
+ result = []
+ for name in names:
+ target = self.store[name]
+ if target.has_column() and target.column < column: continue
+ result.append(target.row)
+ return result"
+1690,https://:@github.com/benselme/babel.git,b9efb7e3624af2bb64b663d6c9908c597cf09a23,"@@ -99,7 +99,7 @@ def _validate_format(format, alternative):
+ result = []
+ for match in PYTHON_FORMAT.finditer(string):
+ name, format, typechar = match.groups()
+- if typechar == '%' and name is not None:
++ if typechar == '%' and name is None:
+ continue
+ result.append((name, str(typechar)))
+ return result
+",babel/messages/checkers.py,"ReplaceText(target=' is ' @(102,39)->(102,47))","def _validate_format(format, alternative):
+ result = []
+ for match in PYTHON_FORMAT.finditer(string):
+ name, format, typechar = match.groups()
+ if typechar == '%' and name is not None:
+ continue
+ result.append((name, str(typechar)))
+ return result","def _validate_format(format, alternative):
+ result = []
+ for match in PYTHON_FORMAT.finditer(string):
+ name, format, typechar = match.groups()
+ if typechar == '%' and name is None:
+ continue
+ result.append((name, str(typechar)))
+ return result"
+1691,https://:@github.com/martinchristen/pyRT.git,8d97666dc6103f6b86c6698ce3f6c7064983a443,"@@ -104,7 +104,7 @@ class BBox(Shape):
+ tmax = min(min(tmax, tymax), tzmax)
+ tmin = (self[ray.sign[0]].x - ray.start.x) * ray.invdir.x
+
+- return tmin > tmax
++ return tmin < tmax
+
+
+ def surfaceArea(self) -> float:
+",pyrt/geometry/bbox.py,"ReplaceText(target='<' @(107,20)->(107,21))","class BBox(Shape):
+ tmax = min(min(tmax, tymax), tzmax)
+ tmin = (self[ray.sign[0]].x - ray.start.x) * ray.invdir.x
+
+ return tmin > tmax
+
+
+ def surfaceArea(self) -> float:","class BBox(Shape):
+ tmax = min(min(tmax, tymax), tzmax)
+ tmin = (self[ray.sign[0]].x - ray.start.x) * ray.invdir.x
+
+ return tmin < tmax
+
+
+ def surfaceArea(self) -> float:"
+1692,https://:@github.com/zxdavb/intouch-client.git,72bb566cb7c42dbd995e3e4f5151e6a59736fe5b,"@@ -204,7 +204,7 @@ class InTouchHeater(InTouchObject):
+ @property
+ def rooms(self) -> list:
+ return [InTouchRoom(r, self) for r in ['1', '2']
+- if True and _convert(
++ if True or _convert(
+ self._data['room_temp_{}_msb'.format(r)],
+ self._data['room_temp_{}_lsb'.format(r)]) is not None]
+
+",intouchclient/__init__.py,"ReplaceText(target='or' @(207,24)->(207,27))","class InTouchHeater(InTouchObject):
+ @property
+ def rooms(self) -> list:
+ return [InTouchRoom(r, self) for r in ['1', '2']
+ if True and _convert(
+ self._data['room_temp_{}_msb'.format(r)],
+ self._data['room_temp_{}_lsb'.format(r)]) is not None]
+ ","class InTouchHeater(InTouchObject):
+ @property
+ def rooms(self) -> list:
+ return [InTouchRoom(r, self) for r in ['1', '2']
+ if True or _convert(
+ self._data['room_temp_{}_msb'.format(r)],
+ self._data['room_temp_{}_lsb'.format(r)]) is not None]
+ "
+1693,https://:@github.com/ralphbean/gnome-shell-search-github-repositories.git,582174cccd6ee618d89c25d9d22350fb6797489d,"@@ -73,7 +73,7 @@ class FedmsgNotifyService(dbus.service.Object, fedmsg.consumers.FedmsgConsumer):
+ icon_file))
+ self._icon_cache[icon] = icon_file
+ icon = icon_file
+- note = Notify.Notification.new(""fedmsg"", pretty_text, icon_file)
++ note = Notify.Notification.new(""fedmsg"", pretty_text, icon)
+ note.show()
+
+ @dbus.service.method(bus_name)
+",fedmsg_notify/daemon.py,"ReplaceText(target='icon' @(76,62)->(76,71))","class FedmsgNotifyService(dbus.service.Object, fedmsg.consumers.FedmsgConsumer):
+ icon_file))
+ self._icon_cache[icon] = icon_file
+ icon = icon_file
+ note = Notify.Notification.new(""fedmsg"", pretty_text, icon_file)
+ note.show()
+
+ @dbus.service.method(bus_name)","class FedmsgNotifyService(dbus.service.Object, fedmsg.consumers.FedmsgConsumer):
+ icon_file))
+ self._icon_cache[icon] = icon_file
+ icon = icon_file
+ note = Notify.Notification.new(""fedmsg"", pretty_text, icon)
+ note.show()
+
+ @dbus.service.method(bus_name)"
+1694,https://:@github.com/strongles/ervin.git,56b38758e5b38eee76dd4af6682f797f9b83c428,"@@ -96,7 +96,7 @@ def find_probes_recursively(file_list, tail=None):
+
+ if len(file_list) == 2:
+ return find_probes(first_probe_data, second_probe_data)
+- elif len(file_list) < 2:
++ elif len(file_list) > 2:
+ return find_probes_recursively(file_list[2:], tail=find_probes(first_probe_data, second_probe_data))
+ else:
+ probe_data = read_probe_records_from_file(file_list[0])
+",src/probe_finder.py,"ReplaceText(target='>' @(99,28)->(99,29))","def find_probes_recursively(file_list, tail=None):
+
+ if len(file_list) == 2:
+ return find_probes(first_probe_data, second_probe_data)
+ elif len(file_list) < 2:
+ return find_probes_recursively(file_list[2:], tail=find_probes(first_probe_data, second_probe_data))
+ else:
+ probe_data = read_probe_records_from_file(file_list[0])","def find_probes_recursively(file_list, tail=None):
+
+ if len(file_list) == 2:
+ return find_probes(first_probe_data, second_probe_data)
+ elif len(file_list) > 2:
+ return find_probes_recursively(file_list[2:], tail=find_probes(first_probe_data, second_probe_data))
+ else:
+ probe_data = read_probe_records_from_file(file_list[0])"
+1695,https://:@github.com/keybase/saltpack-python.git,3a68d9c1fe736602a71ce17671595c1bb5720ce1,"@@ -276,7 +276,7 @@ def get_recipients(args):
+ recipients = []
+ for recipient in args['']:
+ key = binascii.unhexlify(recipient)
+- assert len(recipient) == 32
++ assert len(key) == 32
+ recipients.append(key)
+ return recipients
+ else:
+",encrypt.py,"ReplaceText(target='key' @(279,23)->(279,32))","def get_recipients(args):
+ recipients = []
+ for recipient in args['']:
+ key = binascii.unhexlify(recipient)
+ assert len(recipient) == 32
+ recipients.append(key)
+ return recipients
+ else:","def get_recipients(args):
+ recipients = []
+ for recipient in args['']:
+ key = binascii.unhexlify(recipient)
+ assert len(key) == 32
+ recipients.append(key)
+ return recipients
+ else:"
+1696,https://:@github.com/mike-perdide/gitbuster.git,8ad19a783bfe71c7b3ac9edf60c8c9bb067c23c6,"@@ -226,7 +226,7 @@ class MainWindow(QMainWindow):
+
+ date_edit_widgets = (self._ui.afterDateFilterDateEdit,
+ self._ui.beforeDateFilterDateEdit)
+- for widget in time_edit_widgets:
++ for widget in date_edit_widgets:
+ self.connect(widget, SIGNAL(""dateChanged (const QDate&)""),
+ self.apply_filters)
+
+",qGitFilterBranch/main_window.py,"ReplaceText(target='date_edit_widgets' @(229,22)->(229,39))","class MainWindow(QMainWindow):
+
+ date_edit_widgets = (self._ui.afterDateFilterDateEdit,
+ self._ui.beforeDateFilterDateEdit)
+ for widget in time_edit_widgets:
+ self.connect(widget, SIGNAL(""dateChanged (const QDate&)""),
+ self.apply_filters)
+ ","class MainWindow(QMainWindow):
+
+ date_edit_widgets = (self._ui.afterDateFilterDateEdit,
+ self._ui.beforeDateFilterDateEdit)
+ for widget in date_edit_widgets:
+ self.connect(widget, SIGNAL(""dateChanged (const QDate&)""),
+ self.apply_filters)
+ "
+1697,https://:@bitbucket.org/wyleyr/schoolutils.git,026584c7774cac6eb15d8d7697f9c9bc2453dbc3,"@@ -821,7 +821,7 @@ def date(s):
+ y, m, d = s.strip().split('-')
+ y = year(y)
+ m = month(m)
+- d = day(m)
++ d = day(d)
+ return datetime.date(y, m, d)
+
+ def sid(s):
+",schoolutils/grading/db.py,"ReplaceText(target='d' @(824,12)->(824,13))","def date(s):
+ y, m, d = s.strip().split('-')
+ y = year(y)
+ m = month(m)
+ d = day(m)
+ return datetime.date(y, m, d)
+
+ def sid(s):","def date(s):
+ y, m, d = s.strip().split('-')
+ y = year(y)
+ m = month(m)
+ d = day(d)
+ return datetime.date(y, m, d)
+
+ def sid(s):"
+1698,https://:@github.com/panoptes/piaa.git,c3e81501289525d1eeb40edf892a8139b030cc5f,"@@ -534,7 +534,7 @@ class Observation(object):
+ ls='dashed',
+ edgecolor='blue',
+ ))
+- ax3.add_patch(patches.Rectangle(
++ ax2.add_patch(patches.Rectangle(
+ (0, 0),
+ 9, 9,
+ fill=False,
+",piaa/observation.py,"ReplaceText(target='ax2' @(537,8)->(537,11))","class Observation(object):
+ ls='dashed',
+ edgecolor='blue',
+ ))
+ ax3.add_patch(patches.Rectangle(
+ (0, 0),
+ 9, 9,
+ fill=False,","class Observation(object):
+ ls='dashed',
+ edgecolor='blue',
+ ))
+ ax2.add_patch(patches.Rectangle(
+ (0, 0),
+ 9, 9,
+ fill=False,"
+1699,https://:@github.com/jenzopr/pydemult.git,f28f2da5e86f205887c7431ee6ea583440a47ad7,"@@ -92,7 +92,7 @@ def demultiplex():
+ q_bc_dict = dict((k, barcode_dict[k]) for k in chunk)
+ writer_pool.apply_async(_writer, (q, q_bc_dict), callback = lambda x: print(x))
+ queue_list.append(q)
+- for bc in chunk.values():
++ for bc in q_bc_dict.values():
+ queues[bc] = q
+
+ zcat = subprocess.Popen(['zcat', args.fastq], stdout=subprocess.PIPE, bufsize = bufsize)
+",pydemult/pydemult.py,"ReplaceText(target='q_bc_dict' @(95,18)->(95,23))","def demultiplex():
+ q_bc_dict = dict((k, barcode_dict[k]) for k in chunk)
+ writer_pool.apply_async(_writer, (q, q_bc_dict), callback = lambda x: print(x))
+ queue_list.append(q)
+ for bc in chunk.values():
+ queues[bc] = q
+
+ zcat = subprocess.Popen(['zcat', args.fastq], stdout=subprocess.PIPE, bufsize = bufsize)","def demultiplex():
+ q_bc_dict = dict((k, barcode_dict[k]) for k in chunk)
+ writer_pool.apply_async(_writer, (q, q_bc_dict), callback = lambda x: print(x))
+ queue_list.append(q)
+ for bc in q_bc_dict.values():
+ queues[bc] = q
+
+ zcat = subprocess.Popen(['zcat', args.fastq], stdout=subprocess.PIPE, bufsize = bufsize)"
+1700,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"
+1701,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"
+1702,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)
+ "
+1703,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))
+ "
+1704,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))"
+1705,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'])"
+1706,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("
+1707,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"
+1708,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)"
+1709,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),"
+1710,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)"
+1711,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."
+1712,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,"
+1713,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"", """")"
+1714,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"
+1715,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:"
+1716,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"
+1717,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):"
+1718,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)"
+1719,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():"
+1720,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"
+1721,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
+ "
+1722,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
+ "
+1723,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)"
+1724,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__)))"
+1725,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)))"
+1726,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)
+ "
+1727,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:"
+1728,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"
+1729,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')"
+1730,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)
+ "
+1731,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"
+1732,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."
+1733,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)"
+1734,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])"
+1735,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('-')"
+1736,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'),"
+1737,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)"
+1738,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'])"
+1739,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(),"
+1740,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)"
+1741,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__))"
+1742,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"
+1743,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
+
+ # ------------------------------------------------------------------------------
+ "
+1744,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):"
+1745,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"
+1746,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__):"
+1747,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)"
+1748,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"
+1749,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"
+1750,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()"
+1751,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():"
+1752,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.
+ "
+1753,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}"
+1754,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)"
+1755,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)"
+1756,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 ()"
+1757,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) "
+1758,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) "
+1759,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:"
+1760,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 () "
+1761,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))"
+1762,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: "
+1763,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"
+1764,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)"
+1765,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)
+
+ "
+1766,https://:@github.com/iclementine/text.git,6c0a9c4c902fff15b3039254e38c33ba87b0630f,"@@ -126,7 +126,7 @@ class Vocab(object):
+ self.itos = [''] + specials
+
+ counter.subtract({tok: counter[tok] for tok in [''] + 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 = [''] + specials
+
+ counter.subtract({tok: counter[tok] for tok in [''] + 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 = [''] + specials
+
+ counter.subtract({tok: counter[tok] for tok in [''] + 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])"
+1767,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])"
+1768,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"
+1769,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:"
+1770,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)"
+1771,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. """
+1772,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']:"
+1773,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()"
+1774,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"
+1775,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:"
+1776,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"
+1777,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"
+1778,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()"
+1779,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)
+ "
+1780,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"
+1781,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):"
+1782,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
+ "
+1783,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 """
+1784,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
+ )"
+1785,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 '"
+1786,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))"
+1787,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),
+ }
+ "
+1788,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)"
+1789,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:"
+1790,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"
+1791,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.
+ "
+1792,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()"
+1793,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]))"
+1794,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)"
+1795,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,"
+1796,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: "
+1797,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("
+1798,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"
+1799,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:"
+1800,https://:@github.com/Infinidat/infi.pypi_manager.git,d7b669eaf58a03e887135683264dd475d67f2e39,"@@ -115,7 +115,7 @@ def mirror_file(repository_config, filename, package_name, package_version, meta
+ data.update(metadata)
+
+ for key, value in list(data.items()):
+- if isinstance(value, str):
++ if not isinstance(value, str):
+ data[key] = value.encode(""utf-8"")
+
+ repository = repository_config[""repository""]
+",src/infi/pypi_manager/mirror/mirror_all.py,"ReplaceText(target='not ' @(118,11)->(118,11))","def mirror_file(repository_config, filename, package_name, package_version, meta
+ data.update(metadata)
+
+ for key, value in list(data.items()):
+ if isinstance(value, str):
+ data[key] = value.encode(""utf-8"")
+
+ repository = repository_config[""repository""]","def mirror_file(repository_config, filename, package_name, package_version, meta
+ data.update(metadata)
+
+ for key, value in list(data.items()):
+ if not isinstance(value, str):
+ data[key] = value.encode(""utf-8"")
+
+ repository = repository_config[""repository""]"
+1801,https://:@github.com/novopl/fabops.git,ea5c44f518554a239afd8650d216ea1f7e23db9e,"@@ -105,7 +105,7 @@ def lint(exclude, include_untracked, commit_only, pretend):
+ exclude = list(exclude) # Convert from tuple to easily concatenate.
+
+ if commit_only:
+- include = ['*' + f for f in git.staged() if f.endswith('.py')]
++ include += ['*' + f for f in git.staged() if f.endswith('.py')]
+ exclude += git.ignore()
+
+ if not include_untracked:
+",src/peltak/commands/lint.py,"ReplaceText(target='+=' @(108,16)->(108,17))","def lint(exclude, include_untracked, commit_only, pretend):
+ exclude = list(exclude) # Convert from tuple to easily concatenate.
+
+ if commit_only:
+ include = ['*' + f for f in git.staged() if f.endswith('.py')]
+ exclude += git.ignore()
+
+ if not include_untracked:","def lint(exclude, include_untracked, commit_only, pretend):
+ exclude = list(exclude) # Convert from tuple to easily concatenate.
+
+ if commit_only:
+ include += ['*' + f for f in git.staged() if f.endswith('.py')]
+ exclude += git.ignore()
+
+ if not include_untracked:"
+1802,https://:@github.com/novopl/fabops.git,94bb4222594c1be8cb1d760d21abccf8393fbe57,"@@ -95,7 +95,7 @@ def finish():
+ common.git_branch_delete(branch.name)
+ common.git_prune()
+
+- common.git_checkout(develop)
++ common.git_checkout(master)
+
+
+ def merged():
+",src/peltak/extra/gitflow/logic/release.py,"ReplaceText(target='master' @(98,24)->(98,31))","def finish():
+ common.git_branch_delete(branch.name)
+ common.git_prune()
+
+ common.git_checkout(develop)
+
+
+ def merged():","def finish():
+ common.git_branch_delete(branch.name)
+ common.git_prune()
+
+ common.git_checkout(master)
+
+
+ def merged():"
+1803,https://:@github.com/novopl/fabops.git,4ace52dda2d85cb734ee74e126530e805777a000,"@@ -72,7 +72,7 @@ def add_hooks():
+
+ # Write pre-push hook
+ log.info(""Adding pre-push hook: <33>{}"", push_hook)
+- fs.write_file(commit_hook, util.remove_indent('''
++ fs.write_file(push_hook, util.remove_indent('''
+ #!/bin/bash
+ PATH=""/opt/local/libexec/gnubin:$PATH""
+
+",src/peltak/logic/git.py,"ReplaceText(target='push_hook' @(75,18)->(75,29))","def add_hooks():
+
+ # Write pre-push hook
+ log.info(""Adding pre-push hook: <33>{}"", push_hook)
+ fs.write_file(commit_hook, util.remove_indent('''
+ #!/bin/bash
+ PATH=""/opt/local/libexec/gnubin:$PATH""
+ ","def add_hooks():
+
+ # Write pre-push hook
+ log.info(""Adding pre-push hook: <33>{}"", push_hook)
+ fs.write_file(push_hook, util.remove_indent('''
+ #!/bin/bash
+ PATH=""/opt/local/libexec/gnubin:$PATH""
+ "
+1804,https://:@github.com/ome/omero-scripts.git,bcf0a97fecbc46da12cd0fc1dc679d6eb1a002d4,"@@ -186,7 +186,7 @@ def createmovie_figure(conn, pixel_ids, t_indexes, z_start, z_end, width,
+ plane_def = omero.romio.PlaneDef()
+ plane_def.z = pro_start
+ plane_def.t = time
+- plane_def = re.renderCompressed(plane_def)
++ rendered_img = re.renderCompressed(plane_def)
+ # create images and resize, add to list
+ image = Image.open(io.BytesIO(rendered_img))
+ resized_image = imgUtil.resizeImage(image, width, height)
+",omero/figure_scripts/Movie_Figure.py,"ReplaceText(target='rendered_img' @(189,20)->(189,29))","def createmovie_figure(conn, pixel_ids, t_indexes, z_start, z_end, width,
+ plane_def = omero.romio.PlaneDef()
+ plane_def.z = pro_start
+ plane_def.t = time
+ plane_def = re.renderCompressed(plane_def)
+ # create images and resize, add to list
+ image = Image.open(io.BytesIO(rendered_img))
+ resized_image = imgUtil.resizeImage(image, width, height)","def createmovie_figure(conn, pixel_ids, t_indexes, z_start, z_end, width,
+ plane_def = omero.romio.PlaneDef()
+ plane_def.z = pro_start
+ plane_def.t = time
+ rendered_img = re.renderCompressed(plane_def)
+ # create images and resize, add to list
+ image = Image.open(io.BytesIO(rendered_img))
+ resized_image = imgUtil.resizeImage(image, width, height)"
+1805,https://:@github.com/MozillaSecurity/grizzly.git,5ff196df7b3e4cb6fafece51f3a92dd6fe240639,"@@ -71,7 +71,7 @@ def test_adapter_04(tmp_path):
+ # path to file
+ file1 = (tmp_path / ""test1.txt"")
+ file1.touch()
+- found = tuple(SimpleAdapter.scan_path(str(tmp_path)))
++ found = tuple(SimpleAdapter.scan_path(str(file1)))
+ assert len(found) == 1
+ assert str(file1) in found
+ # path to directory
+",grizzly/common/test_adapter.py,"ReplaceText(target='file1' @(74,46)->(74,54))","def test_adapter_04(tmp_path):
+ # path to file
+ file1 = (tmp_path / ""test1.txt"")
+ file1.touch()
+ found = tuple(SimpleAdapter.scan_path(str(tmp_path)))
+ assert len(found) == 1
+ assert str(file1) in found
+ # path to directory","def test_adapter_04(tmp_path):
+ # path to file
+ file1 = (tmp_path / ""test1.txt"")
+ file1.touch()
+ found = tuple(SimpleAdapter.scan_path(str(file1)))
+ assert len(found) == 1
+ assert str(file1) in found
+ # path to directory"
+1806,https://:@github.com/CIMAC-CIDC/schemas.git,e7ecb7443f00d666cd8e67b7e643f5837fc2f8f2,"@@ -743,7 +743,7 @@ def merge_artifact(
+ _set_data_format(ct, existing_artifact)
+
+ # return new object and the artifact that was merged
+- return ct, artifact
++ return ct, existing_artifact
+
+ class InvalidMergeTargetException(ValueError):
+ """"""Exception raised for target of merge_clinical_trial_metadata being non schema compliant.""""""
+",cidc_schemas/prism.py,"ReplaceText(target='existing_artifact' @(746,15)->(746,23))","def merge_artifact(
+ _set_data_format(ct, existing_artifact)
+
+ # return new object and the artifact that was merged
+ return ct, artifact
+
+ class InvalidMergeTargetException(ValueError):
+ """"""Exception raised for target of merge_clinical_trial_metadata being non schema compliant.""""""","def merge_artifact(
+ _set_data_format(ct, existing_artifact)
+
+ # return new object and the artifact that was merged
+ return ct, existing_artifact
+
+ class InvalidMergeTargetException(ValueError):
+ """"""Exception raised for target of merge_clinical_trial_metadata being non schema compliant."""""""
+1807,https://:@github.com/CIMAC-CIDC/schemas.git,c7ddda9fbcc6fed237e11e3024e6ea610b08ecfa,"@@ -535,7 +535,7 @@ class Template:
+ raise Exception(e)
+
+ changes.extend(chs)
+- fs.extend(fs)
++ files.extend(fs)
+
+ return changes, files
+
+",cidc_schemas/template.py,"ReplaceText(target='files' @(538,12)->(538,14))","class Template:
+ raise Exception(e)
+
+ changes.extend(chs)
+ fs.extend(fs)
+
+ return changes, files
+ ","class Template:
+ raise Exception(e)
+
+ changes.extend(chs)
+ files.extend(fs)
+
+ return changes, files
+ "
+1808,https://:@github.com/ggstuart/pyEMIS.git,05b6ac16ca87ee3a9e5696ecc27b9bb4024cc7f1,"@@ -29,7 +29,7 @@ class SimpleProfile(AnalysisBase):
+ result = {}
+ pred = self.baseline_model.prediction(this_week)
+ for p in percentiles:
+- result[p] = pred + self.baseline_model.percentile_in_place(p, this_week)
++ result[p] = pred + self.baseline_model.percentile_in_place(this_week, p)
+ return result
+
+
+",lib/analysis/profile.py,"ArgSwap(idxs=0<->1 @(32,31)->(32,70))","class SimpleProfile(AnalysisBase):
+ result = {}
+ pred = self.baseline_model.prediction(this_week)
+ for p in percentiles:
+ result[p] = pred + self.baseline_model.percentile_in_place(p, this_week)
+ return result
+
+ ","class SimpleProfile(AnalysisBase):
+ result = {}
+ pred = self.baseline_model.prediction(this_week)
+ for p in percentiles:
+ result[p] = pred + self.baseline_model.percentile_in_place(this_week, p)
+ return result
+
+ "
+1809,https://:@github.com/scipion-em/scipion-em.git,aab3b1e42dbced18cebf4b6e8fd15265288693d0,"@@ -122,7 +122,7 @@ class ProtFrealignClassify(ProtFrealignBase, ProtClassify3D):
+ for ref in range(1, self.numberOfRef + 1):
+ refVol = self._getFileName('ref_vol_class', iter=iter, ref=ref) # reference volume of the step.
+ iterVol = self._getFileName('iter_vol_class', iter=iter, ref=ref) # refined volumes of the step
+- if iter != 1:
++ if iter == 1:
+ copyFile(volFn, iterVol) #Copy the initial volume in the current directory.
+ else:
+ self._splitParFile(iter, ref, cpusRef[ref-1])
+",pwem/packages/brandeis/protocol_ml_classification.py,"ReplaceText(target='==' @(125,20)->(125,22))","class ProtFrealignClassify(ProtFrealignBase, ProtClassify3D):
+ for ref in range(1, self.numberOfRef + 1):
+ refVol = self._getFileName('ref_vol_class', iter=iter, ref=ref) # reference volume of the step.
+ iterVol = self._getFileName('iter_vol_class', iter=iter, ref=ref) # refined volumes of the step
+ if iter != 1:
+ copyFile(volFn, iterVol) #Copy the initial volume in the current directory.
+ else:
+ self._splitParFile(iter, ref, cpusRef[ref-1])","class ProtFrealignClassify(ProtFrealignBase, ProtClassify3D):
+ for ref in range(1, self.numberOfRef + 1):
+ refVol = self._getFileName('ref_vol_class', iter=iter, ref=ref) # reference volume of the step.
+ iterVol = self._getFileName('iter_vol_class', iter=iter, ref=ref) # refined volumes of the step
+ if iter == 1:
+ copyFile(volFn, iterVol) #Copy the initial volume in the current directory.
+ else:
+ self._splitParFile(iter, ref, cpusRef[ref-1])"
+1810,https://:@github.com/scipion-em/scipion-em.git,79434578b0e8d5d29e900b60aa9fadddcc75d1bf,"@@ -177,7 +177,7 @@ class ProtPrime(em.ProtInitialVolume):
+ vol.append(aux)
+ self._defineOutputs(outputVolumes=vol)
+
+- self._defineSourceRelation(vol, self.inputClasses)
++ self._defineSourceRelation(self.inputClasses, vol)
+
+ #--------------------------- INFO functions --------------------------------------------
+ def _summary(self):
+",pwem/packages/simple/protocol_prime.py,"ArgSwap(idxs=0<->1 @(180,8)->(180,34))","class ProtPrime(em.ProtInitialVolume):
+ vol.append(aux)
+ self._defineOutputs(outputVolumes=vol)
+
+ self._defineSourceRelation(vol, self.inputClasses)
+
+ #--------------------------- INFO functions --------------------------------------------
+ def _summary(self):","class ProtPrime(em.ProtInitialVolume):
+ vol.append(aux)
+ self._defineOutputs(outputVolumes=vol)
+
+ self._defineSourceRelation(self.inputClasses, vol)
+
+ #--------------------------- INFO functions --------------------------------------------
+ def _summary(self):"
+1811,https://:@github.com/scipion-em/scipion-em.git,14b6a308b1710c111cdc515b1d4367b0d6289c77,"@@ -121,7 +121,7 @@ class ProtSummovie(ProtProcessMovies):
+ # special case is mrc but ends in mrcs
+ inMovieName= os.path.join(movieFolder,movieName)
+ if movieName.endswith('.mrc'):
+- movieNameAux = inMovieName
++ movieNameAux = movieName
+ elif movieName.endswith('.mrcs'):
+ movieNameAux= pwutils.replaceExt(inMovieName, ""mrc"")
+ createLink(inMovieName,movieNameAux)
+",pwem/packages/grigoriefflab/protocol_summovie.py,"ReplaceText(target='movieName' @(124,27)->(124,38))","class ProtSummovie(ProtProcessMovies):
+ # special case is mrc but ends in mrcs
+ inMovieName= os.path.join(movieFolder,movieName)
+ if movieName.endswith('.mrc'):
+ movieNameAux = inMovieName
+ elif movieName.endswith('.mrcs'):
+ movieNameAux= pwutils.replaceExt(inMovieName, ""mrc"")
+ createLink(inMovieName,movieNameAux)","class ProtSummovie(ProtProcessMovies):
+ # special case is mrc but ends in mrcs
+ inMovieName= os.path.join(movieFolder,movieName)
+ if movieName.endswith('.mrc'):
+ movieNameAux = movieName
+ elif movieName.endswith('.mrcs'):
+ movieNameAux= pwutils.replaceExt(inMovieName, ""mrc"")
+ createLink(inMovieName,movieNameAux)"
+1812,https://:@github.com/scipion-em/scipion-em.git,9c9bbe991ab901a16c11eece48cb54468b1b663a,"@@ -90,7 +90,7 @@ class ChimeraViewerBase(Viewer):
+ if _showVol.hasOrigin():
+ x, y, z = _showVol.getOrigin().getShifts()
+ else:
+- x, y, z = outputVol.getOrigin(force=True).getShifts()
++ x, y, z = _showVol.getOrigin(force=True).getShifts()
+
+ f.write(""volume #1 style surface voxelSize %f origin ""
+ ""%0.2f,%0.2f,%0.2f\n""
+",pwem/packages/chimera/viewer.py,"ReplaceText(target='_showVol' @(93,26)->(93,35))","class ChimeraViewerBase(Viewer):
+ if _showVol.hasOrigin():
+ x, y, z = _showVol.getOrigin().getShifts()
+ else:
+ x, y, z = outputVol.getOrigin(force=True).getShifts()
+
+ f.write(""volume #1 style surface voxelSize %f origin ""
+ ""%0.2f,%0.2f,%0.2f\n""","class ChimeraViewerBase(Viewer):
+ if _showVol.hasOrigin():
+ x, y, z = _showVol.getOrigin().getShifts()
+ else:
+ x, y, z = _showVol.getOrigin(force=True).getShifts()
+
+ f.write(""volume #1 style surface voxelSize %f origin ""
+ ""%0.2f,%0.2f,%0.2f\n"""
+1813,https://:@github.com/scipion-em/scipion-em.git,2d9ba7dfcd59de3b77e19cb23d5fa2ad34c80d55,"@@ -110,7 +110,7 @@ class scipionMMCIFIO(MMCIFIO):
+ hetfield, resseq, icode = residue.get_id()
+ if hetfield == "" "":
+ residue_type = ""ATOM""
+- label_seq_id = str(residue_number)
++ label_seq_id = str(resseq)
+ residue_number += 1
+ else:
+ residue_type = ""HETATM""
+",pwem/convert/atom_struct.py,"ReplaceText(target='resseq' @(113,47)->(113,61))","class scipionMMCIFIO(MMCIFIO):
+ hetfield, resseq, icode = residue.get_id()
+ if hetfield == "" "":
+ residue_type = ""ATOM""
+ label_seq_id = str(residue_number)
+ residue_number += 1
+ else:
+ residue_type = ""HETATM""","class scipionMMCIFIO(MMCIFIO):
+ hetfield, resseq, icode = residue.get_id()
+ if hetfield == "" "":
+ residue_type = ""ATOM""
+ label_seq_id = str(resseq)
+ residue_number += 1
+ else:
+ residue_type = ""HETATM"""
+1814,https://:@github.com/scipion-em/scipion-em.git,18a1a11d22aa9a2e8e046e685264fb8d53a96af5,"@@ -419,7 +419,7 @@ class ImageHandler(object):
+ def createEmptyImage(cls, fnOut, xDim=1, yDim=1, zDim=1, nDim=1,
+ dataType=None):
+ dt = dataType or cls.DT_FLOAT
+- xmippLib.createEmptyFile(fnOut, xDim, yDim, zDim, nDim, dataType)
++ xmippLib.createEmptyFile(fnOut, xDim, yDim, zDim, nDim, dt)
+
+ @classmethod
+ def isImageFile(cls, imgFn):
+",pwem/convert/image_handler.py,"ReplaceText(target='dt' @(422,64)->(422,72))","class ImageHandler(object):
+ def createEmptyImage(cls, fnOut, xDim=1, yDim=1, zDim=1, nDim=1,
+ dataType=None):
+ dt = dataType or cls.DT_FLOAT
+ xmippLib.createEmptyFile(fnOut, xDim, yDim, zDim, nDim, dataType)
+
+ @classmethod
+ def isImageFile(cls, imgFn):","class ImageHandler(object):
+ def createEmptyImage(cls, fnOut, xDim=1, yDim=1, zDim=1, nDim=1,
+ dataType=None):
+ dt = dataType or cls.DT_FLOAT
+ xmippLib.createEmptyFile(fnOut, xDim, yDim, zDim, nDim, dt)
+
+ @classmethod
+ def isImageFile(cls, imgFn):"
+1815,https://:@github.com/gedaskir/qmeq.git,347cea42998433ead153e7701cf69caa5086ee13,"@@ -364,8 +364,8 @@ class LeadsTunneling(object):
+ self.Tba0 = construct_Tba(tleadsp, self.stateind, self.mtype, self.Tba0)
+ if updateq:
+ for j0 in tleadsp:
+- try: self.tleads[j0] += tleadsp[j0] # if tleads[j0] != 0:
+- except: self.tleads.update({j0:tleads[j0]}) # if tleads[j0] != 0:
++ try: self.tleads[j0] += tleadsp[j0] # if tleads[j0] != 0:
++ except: self.tleads.update({j0:tleadsp[j0]}) # if tleads[j0] != 0:
+
+ def change(self, tleads=None, mulst=None, tlst=None, dlst=None, updateq=True):
+ """"""
+",qmeq/leadstun.py,"ReplaceText(target='tleadsp' @(368,51)->(368,57))","class LeadsTunneling(object):
+ self.Tba0 = construct_Tba(tleadsp, self.stateind, self.mtype, self.Tba0)
+ if updateq:
+ for j0 in tleadsp:
+ try: self.tleads[j0] += tleadsp[j0] # if tleads[j0] != 0:
+ except: self.tleads.update({j0:tleads[j0]}) # if tleads[j0] != 0:
+
+ def change(self, tleads=None, mulst=None, tlst=None, dlst=None, updateq=True):
+ """"""","class LeadsTunneling(object):
+ self.Tba0 = construct_Tba(tleadsp, self.stateind, self.mtype, self.Tba0)
+ if updateq:
+ for j0 in tleadsp:
+ try: self.tleads[j0] += tleadsp[j0] # if tleads[j0] != 0:
+ except: self.tleads.update({j0:tleadsp[j0]}) # if tleads[j0] != 0:
+
+ def change(self, tleads=None, mulst=None, tlst=None, dlst=None, updateq=True):
+ """""""
+1816,https://:@github.com/caleb-easterly/metaquant.git,745e72d4ef68c944db5395e09bd85070b8e2652a,"@@ -17,7 +17,7 @@ def common_hierarchical_analysis(db, df, annot_colname, samp_grps, min_peptides,
+
+ # filter
+ int_all_ranks_filt = stats.filter_min_observed(intensity_all_ranks, threshold, samp_grps)
+- int_all_ranks_filt['id'] = intensity_all_ranks.index
++ int_all_ranks_filt['id'] = int_all_ranks_filt.index
+
+ # calculate means
+ int_w_means = stats.calc_means(int_all_ranks_filt, samp_grps)
+",metaquant/analysis/common.py,"ReplaceText(target='int_all_ranks_filt' @(20,31)->(20,50))","def common_hierarchical_analysis(db, df, annot_colname, samp_grps, min_peptides,
+
+ # filter
+ int_all_ranks_filt = stats.filter_min_observed(intensity_all_ranks, threshold, samp_grps)
+ int_all_ranks_filt['id'] = intensity_all_ranks.index
+
+ # calculate means
+ int_w_means = stats.calc_means(int_all_ranks_filt, samp_grps)","def common_hierarchical_analysis(db, df, annot_colname, samp_grps, min_peptides,
+
+ # filter
+ int_all_ranks_filt = stats.filter_min_observed(intensity_all_ranks, threshold, samp_grps)
+ int_all_ranks_filt['id'] = int_all_ranks_filt.index
+
+ # calculate means
+ int_w_means = stats.calc_means(int_all_ranks_filt, samp_grps)"
+1817,https://:@github.com/matthiask/django-keyed-urls.git,85701797d220d26d175a834250969d86aa8a08c6,"@@ -55,7 +55,7 @@ def get_url(key, language=None, fail_silently=False):
+ url = None
+
+ if url is None and not fail_silently:
+- raise KeyDoesNotExist('No match found for key ""%s"".' % url)
++ raise KeyDoesNotExist('No match found for key ""%s"".' % key)
+
+ return None if url == _none_type else url
+
+",keyed_urls/__init__.py,"ReplaceText(target='key' @(58,63)->(58,66))","def get_url(key, language=None, fail_silently=False):
+ url = None
+
+ if url is None and not fail_silently:
+ raise KeyDoesNotExist('No match found for key ""%s"".' % url)
+
+ return None if url == _none_type else url
+ ","def get_url(key, language=None, fail_silently=False):
+ url = None
+
+ if url is None and not fail_silently:
+ raise KeyDoesNotExist('No match found for key ""%s"".' % key)
+
+ return None if url == _none_type else url
+ "
+1818,https://:@github.com/sommalia/moco-wrapper.git,8463f534ca51588a6619f61f59bb5d0d064511ab,"@@ -42,7 +42,7 @@ class Unit(MWRAPBase):
+ if value is not None:
+ params[key] = value
+
+- if sort_order is not None:
++ if sort_by is not None:
+ params[""sort_by""] = ""{} {}"".format(sort_by, sort_order)
+
+ return self._moco.get(API_PATH[""unit_getlist""], params=params)
+",moco_wrapper/models/unit.py,"ReplaceText(target='sort_by' @(45,11)->(45,21))","class Unit(MWRAPBase):
+ if value is not None:
+ params[key] = value
+
+ if sort_order is not None:
+ params[""sort_by""] = ""{} {}"".format(sort_by, sort_order)
+
+ return self._moco.get(API_PATH[""unit_getlist""], params=params)","class Unit(MWRAPBase):
+ if value is not None:
+ params[key] = value
+
+ if sort_by is not None:
+ params[""sort_by""] = ""{} {}"".format(sort_by, sort_order)
+
+ return self._moco.get(API_PATH[""unit_getlist""], params=params)"
+1819,https://:@github.com/scupid-admin/morph-python-sdk.git,0739734905cb5e49f54807792dc9426884be6eae,"@@ -11,7 +11,7 @@ def read_and_set_attribute(event, context):
+ ""9711xxx400"": True,
+ ""8130xxx599"": True
+ }
+- phone_number = context[""userVariables""][""_PHONE_NUMBER""]
++ phone_number = event[""userVariables""][""_PHONE_NUMBER""]
+ if phone_number is None:
+ phone_number = """"
+ else:
+",morph/examples.py,"ReplaceText(target='event' @(14,19)->(14,26))","def read_and_set_attribute(event, context):
+ ""9711xxx400"": True,
+ ""8130xxx599"": True
+ }
+ phone_number = context[""userVariables""][""_PHONE_NUMBER""]
+ if phone_number is None:
+ phone_number = """"
+ else:","def read_and_set_attribute(event, context):
+ ""9711xxx400"": True,
+ ""8130xxx599"": True
+ }
+ phone_number = event[""userVariables""][""_PHONE_NUMBER""]
+ if phone_number is None:
+ phone_number = """"
+ else:"
+1820,https://:@github.com/Scorpi000/QuantStudio.git,c158be9b67b0058be35cc3b7e8b1c04e3c06d252,"@@ -315,7 +315,7 @@ class FactorTurnover(BaseModule):
+ HTML += """"
+ else:
+ HTML = """"
+- iHTML += self._Output[""统计数据""].to_html(formatters=[_QS_formatPandasPercentage]*5)
++ iHTML = self._Output[""统计数据""].to_html(formatters=[_QS_formatPandasPercentage]*5)
+ Pos = iHTML.find("">"")
+ HTML += iHTML[:Pos]+' align=""center""'+iHTML[Pos:]
+ Fig = self.genMatplotlibFig()
+",QuantStudio/BackTest/SectionFactor/Correlation.py,"ReplaceText(target='=' @(318,14)->(318,16))","class FactorTurnover(BaseModule):
+ HTML += """"
+ else:
+ HTML = """"
+ iHTML += self._Output[""统计数据""].to_html(formatters=[_QS_formatPandasPercentage]*5)
+ Pos = iHTML.find("">"")
+ HTML += iHTML[:Pos]+' align=""center""'+iHTML[Pos:]
+ Fig = self.genMatplotlibFig()","class FactorTurnover(BaseModule):
+ HTML += """"
+ else:
+ HTML = """"
+ iHTML = self._Output[""统计数据""].to_html(formatters=[_QS_formatPandasPercentage]*5)
+ Pos = iHTML.find("">"")
+ HTML += iHTML[:Pos]+' align=""center""'+iHTML[Pos:]
+ Fig = self.genMatplotlibFig()"
+1821,https://:@github.com/Scorpi000/QuantStudio.git,2d2788d5d5192b8b90868c30e247ef6533fb1164,"@@ -667,7 +667,7 @@ class SQLDB(QSSQLObject, WritableFactorDB):
+ if (DataLenMax!=DataLenMin).sum()>0:
+ self._QS_Logger.warning(""'%s' 在写入因子 '%s' 时出现因子值长度不一致的情况, 将填充缺失!"" % (self.Name, str(data.columns.tolist())))
+ for i in range(data.shape[0]):
+- iDataLen = DataLen.iloc[i]
++ iDataLen = DataLenMax.iloc[i]
+ if iDataLen>0:
+ iData = data.iloc[i].apply(lambda x: [None]*(iDataLen-len(x))+x if isinstance(x, list) else [x]*iDataLen).tolist()
+ NewData.extend(zip(*iData))
+",QuantStudio/FactorDataBase/SQLDB.py,"ReplaceText(target='DataLenMax' @(670,23)->(670,30))","class SQLDB(QSSQLObject, WritableFactorDB):
+ if (DataLenMax!=DataLenMin).sum()>0:
+ self._QS_Logger.warning(""'%s' 在写入因子 '%s' 时出现因子值长度不一致的情况, 将填充缺失!"" % (self.Name, str(data.columns.tolist())))
+ for i in range(data.shape[0]):
+ iDataLen = DataLen.iloc[i]
+ if iDataLen>0:
+ iData = data.iloc[i].apply(lambda x: [None]*(iDataLen-len(x))+x if isinstance(x, list) else [x]*iDataLen).tolist()
+ NewData.extend(zip(*iData))","class SQLDB(QSSQLObject, WritableFactorDB):
+ if (DataLenMax!=DataLenMin).sum()>0:
+ self._QS_Logger.warning(""'%s' 在写入因子 '%s' 时出现因子值长度不一致的情况, 将填充缺失!"" % (self.Name, str(data.columns.tolist())))
+ for i in range(data.shape[0]):
+ iDataLen = DataLenMax.iloc[i]
+ if iDataLen>0:
+ iData = data.iloc[i].apply(lambda x: [None]*(iDataLen-len(x))+x if isinstance(x, list) else [x]*iDataLen).tolist()
+ NewData.extend(zip(*iData))"
+1822,https://:@github.com/servir-mekong/hydra-floods.git,f7de9b4516deb7ac5055624fb9012596ac25374c,"@@ -129,7 +129,7 @@ def globalOtsu(collection,target_date,region,
+ imageEdge = target.mask(edges)
+ histogram_image = target.mask(edgeBuffer)
+
+- histogram = histogram_image.reduceRegion(ee.Reducer.histogram(255, 2)\
++ histogram = target.reduceRegion(ee.Reducer.histogram(255, 2)\
+ .combine('mean', None, True)\
+ .combine('variance', None,True),sampleRegion,reductionScale,bestEffort=True)
+
+",hydrafloods/geeutils.py,"ReplaceText(target='target' @(132,17)->(132,32))","def globalOtsu(collection,target_date,region,
+ imageEdge = target.mask(edges)
+ histogram_image = target.mask(edgeBuffer)
+
+ histogram = histogram_image.reduceRegion(ee.Reducer.histogram(255, 2)\
+ .combine('mean', None, True)\
+ .combine('variance', None,True),sampleRegion,reductionScale,bestEffort=True)
+ ","def globalOtsu(collection,target_date,region,
+ imageEdge = target.mask(edges)
+ histogram_image = target.mask(edgeBuffer)
+
+ histogram = target.reduceRegion(ee.Reducer.histogram(255, 2)\
+ .combine('mean', None, True)\
+ .combine('variance', None,True),sampleRegion,reductionScale,bestEffort=True)
+ "
+1823,https://:@github.com/pytorchbearer/visual.git,c2d6f39bebb1754a92d3499ff0a5eca64b206ca4,"@@ -265,7 +265,7 @@ class CPPNImage(Image):
+
+ x_coord_range = torch.linspace(-r, r, steps=self.width)
+ y_coord_range = torch.linspace(-r, r, steps=self.height)
+- x, y = torch.meshgrid(x_coord_range, y_coord_range)
++ x, y = torch.meshgrid(y_coord_range, x_coord_range)
+
+ self.loc = nn.Parameter(torch.stack((x, y), dim=0).unsqueeze(0), requires_grad=False)
+
+",visual/images.py,"ArgSwap(idxs=0<->1 @(268,15)->(268,29))","class CPPNImage(Image):
+
+ x_coord_range = torch.linspace(-r, r, steps=self.width)
+ y_coord_range = torch.linspace(-r, r, steps=self.height)
+ x, y = torch.meshgrid(x_coord_range, y_coord_range)
+
+ self.loc = nn.Parameter(torch.stack((x, y), dim=0).unsqueeze(0), requires_grad=False)
+ ","class CPPNImage(Image):
+
+ x_coord_range = torch.linspace(-r, r, steps=self.width)
+ y_coord_range = torch.linspace(-r, r, steps=self.height)
+ x, y = torch.meshgrid(y_coord_range, x_coord_range)
+
+ self.loc = nn.Parameter(torch.stack((x, y), dim=0).unsqueeze(0), requires_grad=False)
+ "
+1824,https://:@github.com/ocsmit/raster-indices-calc.git,d8eb85db236c048cccf1506180e37d1bbd2734ff,"@@ -473,7 +473,7 @@ def NDBaI(landsat_dir, ndbai_out):
+ swir1_band = SWIR1_path.GetRasterBand(1).ReadAsArray().astype(np.float32)
+ TIR_path = gdal.Open(os.path.join(landsat_dir, tir[0]))
+ tir_band = TIR_path.GetRasterBand(1).ReadAsArray().astype(np.float32)
+- snap = gdal.Open(os.path.join(landsat_dir, swir1[0]))
++ snap = gdal.Open(os.path.join(landsat_dir, tir[0]))
+
+ # Perform Calculation
+ ndbai = ((swir1_band - tir_band) / (swir1_band + tir_band))
+",rindcalc/index_utils.py,"ReplaceText(target='tir' @(476,47)->(476,52))","def NDBaI(landsat_dir, ndbai_out):
+ swir1_band = SWIR1_path.GetRasterBand(1).ReadAsArray().astype(np.float32)
+ TIR_path = gdal.Open(os.path.join(landsat_dir, tir[0]))
+ tir_band = TIR_path.GetRasterBand(1).ReadAsArray().astype(np.float32)
+ snap = gdal.Open(os.path.join(landsat_dir, swir1[0]))
+
+ # Perform Calculation
+ ndbai = ((swir1_band - tir_band) / (swir1_band + tir_band))","def NDBaI(landsat_dir, ndbai_out):
+ swir1_band = SWIR1_path.GetRasterBand(1).ReadAsArray().astype(np.float32)
+ TIR_path = gdal.Open(os.path.join(landsat_dir, tir[0]))
+ tir_band = TIR_path.GetRasterBand(1).ReadAsArray().astype(np.float32)
+ snap = gdal.Open(os.path.join(landsat_dir, tir[0]))
+
+ # Perform Calculation
+ ndbai = ((swir1_band - tir_band) / (swir1_band + tir_band))"
+1825,https://:@github.com/spacegraphcats/spacegraphcats.git,99052c4fbbebc852ccc6e6eca6f3732b054ed274,"@@ -75,7 +75,7 @@ def load_and_compute_augg(project):
+ changed = True
+ d = 1
+ print(""Augmenting"", end="" "", flush=True)
+- while changed and d <= project.radius:
++ while changed and d < project.radius:
+ if d in augs:
+ print(""({})"".format(d), end="" "", flush=True)
+ with open(augname.format(d), 'r') as f:
+",build-catlas.py,"ReplaceText(target='<' @(78,24)->(78,26))","def load_and_compute_augg(project):
+ changed = True
+ d = 1
+ print(""Augmenting"", end="" "", flush=True)
+ while changed and d <= project.radius:
+ if d in augs:
+ print(""({})"".format(d), end="" "", flush=True)
+ with open(augname.format(d), 'r') as f:","def load_and_compute_augg(project):
+ changed = True
+ d = 1
+ print(""Augmenting"", end="" "", flush=True)
+ while changed and d < project.radius:
+ if d in augs:
+ print(""({})"".format(d), end="" "", flush=True)
+ with open(augname.format(d), 'r') as f:"
+1826,https://:@github.com/spacegraphcats/spacegraphcats.git,5267323b50570258de758732d04239fef6cc0a93,"@@ -55,7 +55,7 @@ def main():
+
+ query_mh = query_sig.minhash
+ query_mh = query_mh.downsample_max_hash(frontier_mh)
+- frontier_mh = query_mh.downsample_max_hash(query_mh)
++ frontier_mh = frontier_mh.downsample_max_hash(query_mh)
+
+ containment = query_mh.contained_by(frontier_mh)
+ similarity = query_mh.similarity(frontier_mh)
+",search/frontier_search_batch.py,"ReplaceText(target='frontier_mh' @(58,22)->(58,30))","def main():
+
+ query_mh = query_sig.minhash
+ query_mh = query_mh.downsample_max_hash(frontier_mh)
+ frontier_mh = query_mh.downsample_max_hash(query_mh)
+
+ containment = query_mh.contained_by(frontier_mh)
+ similarity = query_mh.similarity(frontier_mh)","def main():
+
+ query_mh = query_sig.minhash
+ query_mh = query_mh.downsample_max_hash(frontier_mh)
+ frontier_mh = frontier_mh.downsample_max_hash(query_mh)
+
+ containment = query_mh.contained_by(frontier_mh)
+ similarity = query_mh.similarity(frontier_mh)"
+1827,https://:@github.com/spacegraphcats/spacegraphcats.git,df62df921fd822029c1ae7a139f0d75c8b576295,"@@ -120,7 +120,7 @@ def main(args=sys.argv[1:]):
+ if 2**ratio < 10:
+ new_node_set.add(node_id)
+
+- if mh_size > 1:
++ if mh > 1:
+ n_merged += 1
+ merge_mh.merge(mh)
+
+",search/extract_nodes_by_shadow_ratio.py,"ReplaceText(target='mh' @(123,15)->(123,22))","def main(args=sys.argv[1:]):
+ if 2**ratio < 10:
+ new_node_set.add(node_id)
+
+ if mh_size > 1:
+ n_merged += 1
+ merge_mh.merge(mh)
+ ","def main(args=sys.argv[1:]):
+ if 2**ratio < 10:
+ new_node_set.add(node_id)
+
+ if mh > 1:
+ n_merged += 1
+ merge_mh.merge(mh)
+ "
+1828,https://:@github.com/spacegraphcats/spacegraphcats.git,73bf57a0d3b45aa1c5f524e361676a1297e85db0,"@@ -90,7 +90,7 @@ def main(args=sys.argv[1:]):
+ if 1:
+ terminal = set()
+ for subnode in dag[top_node_id]:
+- mh = load_minhash(node_id, minhash_db)
++ mh = load_minhash(subnode, minhash_db)
+ if mh:
+ terminal.update(find_terminal_nodes(subnode, args.maxsize))
+
+",search/extract_nodes_by_shadow_ratio.py,"ReplaceText(target='subnode' @(93,30)->(93,37))","def main(args=sys.argv[1:]):
+ if 1:
+ terminal = set()
+ for subnode in dag[top_node_id]:
+ mh = load_minhash(node_id, minhash_db)
+ if mh:
+ terminal.update(find_terminal_nodes(subnode, args.maxsize))
+ ","def main(args=sys.argv[1:]):
+ if 1:
+ terminal = set()
+ for subnode in dag[top_node_id]:
+ mh = load_minhash(subnode, minhash_db)
+ if mh:
+ terminal.update(find_terminal_nodes(subnode, args.maxsize))
+ "
+1829,https://:@github.com/podhmo/cssdiff.git,fbe359fe1837b98694e9c83a96af2ed7cde53083,"@@ -108,7 +108,7 @@ def difference(s1, s2, op=""+"", iterate=lambda s: sorted(s.items())):
+ if another_value is None:
+ d[style].append(add(name, value))
+ elif value != another_value:
+- d[style].append(change(name, value, another_value))
++ d[style].append(change(name, another_value, value))
+ return d
+
+
+",cssdiff/__init__.py,"ArgSwap(idxs=1<->2 @(111,32)->(111,38))","def difference(s1, s2, op=""+"", iterate=lambda s: sorted(s.items())):
+ if another_value is None:
+ d[style].append(add(name, value))
+ elif value != another_value:
+ d[style].append(change(name, value, another_value))
+ return d
+
+ ","def difference(s1, s2, op=""+"", iterate=lambda s: sorted(s.items())):
+ if another_value is None:
+ d[style].append(add(name, value))
+ elif value != another_value:
+ d[style].append(change(name, another_value, value))
+ return d
+
+ "
+1830,https://:@github.com/bodylabs/capysule.git,d28605af4e7b127dd3e823252bb817666e41fe00,"@@ -10,4 +10,4 @@ class Collection(WrenCollection):
+ if response.status_code == requests.codes.not_found and response.json() == {'message': 'Could not find resource'}:
+ raise NotFound(response.text)
+ else:
+- super(self, Collection).handle_error(response)
++ super(Collection, self).handle_error(response)
+",capysule/collection.py,"ArgSwap(idxs=0<->1 @(13,12)->(13,17))","class Collection(WrenCollection):
+ if response.status_code == requests.codes.not_found and response.json() == {'message': 'Could not find resource'}:
+ raise NotFound(response.text)
+ else:
+ super(self, Collection).handle_error(response)","class Collection(WrenCollection):
+ if response.status_code == requests.codes.not_found and response.json() == {'message': 'Could not find resource'}:
+ raise NotFound(response.text)
+ else:
+ super(Collection, self).handle_error(response)"
+1831,https://:@github.com/kaaengine/kaa.git,172bc5493ac61b92b4acf49ff6e124f10b6e9c2c,"@@ -79,7 +79,7 @@ class DemoScene(Scene):
+ z_index=10,
+ ))
+
+- self.spawn_timer = Timer(20, self._spawn_heartbeat,
++ self.spawn_timer = Timer(self._spawn_heartbeat, 20,
+ single_shot=False)
+ self.spawn_timer.start()
+
+",demos/physics3/main.py,"ArgSwap(idxs=0<->1 @(82,27)->(82,32))","class DemoScene(Scene):
+ z_index=10,
+ ))
+
+ self.spawn_timer = Timer(20, self._spawn_heartbeat,
+ single_shot=False)
+ self.spawn_timer.start()
+ ","class DemoScene(Scene):
+ z_index=10,
+ ))
+
+ self.spawn_timer = Timer(self._spawn_heartbeat, 20,
+ single_shot=False)
+ self.spawn_timer.start()
+ "
+1832,https://:@github.com/oladotunr/cosine.git,2497192592fd0709608c0b6b16dc342b7f645cdc,"@@ -98,7 +98,7 @@ class CosineAlgo(object):
+ instrument = CosineInstrument.load(self.instr_cache, **instr_defs[instr])
+ self._cxt.instruments[instrument.name] = instrument
+ order_worker = CosineOrderWorker(self._cfg.orders.ActiveDepth, instrument, venue, logger=self.logger)
+- self._cxt.orders[k][instr.symbol] = order_worker
++ self._cxt.orders[k][instrument.symbol] = order_worker
+ venue_instruments += 1
+ if venue_instruments == 0:
+ raise LookupError(""No instruments loaded for any of the provided venues"")
+",cosine/core/algo.py,"ReplaceText(target='instrument' @(101,36)->(101,41))","class CosineAlgo(object):
+ instrument = CosineInstrument.load(self.instr_cache, **instr_defs[instr])
+ self._cxt.instruments[instrument.name] = instrument
+ order_worker = CosineOrderWorker(self._cfg.orders.ActiveDepth, instrument, venue, logger=self.logger)
+ self._cxt.orders[k][instr.symbol] = order_worker
+ venue_instruments += 1
+ if venue_instruments == 0:
+ raise LookupError(""No instruments loaded for any of the provided venues"")","class CosineAlgo(object):
+ instrument = CosineInstrument.load(self.instr_cache, **instr_defs[instr])
+ self._cxt.instruments[instrument.name] = instrument
+ order_worker = CosineOrderWorker(self._cfg.orders.ActiveDepth, instrument, venue, logger=self.logger)
+ self._cxt.orders[k][instrument.symbol] = order_worker
+ venue_instruments += 1
+ if venue_instruments == 0:
+ raise LookupError(""No instruments loaded for any of the provided venues"")"
+1833,https://:@github.com/hcji/CTSgetPy.git,93ac966118febd2bd7120f1149eb1f8572939afa,"@@ -52,7 +52,7 @@ def CTSget(source, targets, identifiers, top_only=True, timeout=60, server=""http
+ result = {}
+ if type(targets) is str:
+ result[targets] = CTS_translate_multi(source, targets, identifiers, top_only, timeout, server)
+- elif type(identifiers) is list:
++ elif type(targets) is list:
+ for i in range(len(targets)):
+ target = targets[i]
+ print ('translating from ' + source + ' to ' + target)
+",CTSgetPy/CTSgetPy.py,"ReplaceText(target='targets' @(55,14)->(55,25))","def CTSget(source, targets, identifiers, top_only=True, timeout=60, server=""http
+ result = {}
+ if type(targets) is str:
+ result[targets] = CTS_translate_multi(source, targets, identifiers, top_only, timeout, server)
+ elif type(identifiers) is list:
+ for i in range(len(targets)):
+ target = targets[i]
+ print ('translating from ' + source + ' to ' + target)","def CTSget(source, targets, identifiers, top_only=True, timeout=60, server=""http
+ result = {}
+ if type(targets) is str:
+ result[targets] = CTS_translate_multi(source, targets, identifiers, top_only, timeout, server)
+ elif type(targets) is list:
+ for i in range(len(targets)):
+ target = targets[i]
+ print ('translating from ' + source + ' to ' + target)"
+1834,https://:@github.com/phylliade/vinci.git,8b1940c5613e124a55d11ba257a8800bc12d65a5,"@@ -31,7 +31,7 @@ class SARSAAgent(Agent):
+ self.model = model
+ self.nb_actions = nb_actions
+ self.policy = policy
+- self.test_policy = policy
++ self.test_policy = test_policy
+ self.gamma = gamma
+ self.nb_steps_warmup = nb_steps_warmup
+ self.train_interval = train_interval
+",rl/agents/sarsa.py,"ReplaceText(target='test_policy' @(34,27)->(34,33))","class SARSAAgent(Agent):
+ self.model = model
+ self.nb_actions = nb_actions
+ self.policy = policy
+ self.test_policy = policy
+ self.gamma = gamma
+ self.nb_steps_warmup = nb_steps_warmup
+ self.train_interval = train_interval","class SARSAAgent(Agent):
+ self.model = model
+ self.nb_actions = nb_actions
+ self.policy = policy
+ self.test_policy = test_policy
+ self.gamma = gamma
+ self.nb_steps_warmup = nb_steps_warmup
+ self.train_interval = train_interval"
+1835,https://:@github.com/phelimb/atlas.git,dfacc38b17582837e32e711ecc23926476c19b66,"@@ -297,7 +297,7 @@ class Genotyper(object):
+ for probe_name, probe_coverages in self.variant_covgs.items():
+ probe_id = self._name_to_id(probe_name)
+ variant = None
+- call = gt.type(probe_coverages, variant=variant)
++ call = gt.type(probe_coverages, variant=probe_name)
+ genotypes.append(sum(call[""genotype""]))
+ filters.append(int(call[""info""][""filter""] == ""PASS""))
+ if sum(call[""genotype""]) > 0 or not call[
+",mykatlas/typing/typer/genotyper.py,"ReplaceText(target='probe_name' @(300,52)->(300,59))","class Genotyper(object):
+ for probe_name, probe_coverages in self.variant_covgs.items():
+ probe_id = self._name_to_id(probe_name)
+ variant = None
+ call = gt.type(probe_coverages, variant=variant)
+ genotypes.append(sum(call[""genotype""]))
+ filters.append(int(call[""info""][""filter""] == ""PASS""))
+ if sum(call[""genotype""]) > 0 or not call[","class Genotyper(object):
+ for probe_name, probe_coverages in self.variant_covgs.items():
+ probe_id = self._name_to_id(probe_name)
+ variant = None
+ call = gt.type(probe_coverages, variant=probe_name)
+ genotypes.append(sum(call[""genotype""]))
+ filters.append(int(call[""info""][""filter""] == ""PASS""))
+ if sum(call[""genotype""]) > 0 or not call["
+1836,https://:@github.com/munisisazade/startmicro.git,4c74f41a31a6bef9aaa09586628e8427a7d68851,"@@ -54,7 +54,7 @@ class Command(object):
+ self.write_file(self.folder_name, ""docker-compose.yml"", docker_compose)
+ self.write_file(self.folder_name, ""Dockerfile"", Dockerfile)
+ self.write_file(self.folder_name, ""README.md"", readme)
+- if answers.get(""type"") == ""Restful"" and not answers:
++ if answers.get(""type"") == ""Restful"" or not answers:
+ self.write_file(self.api_path, ""producer.py"", producer_restful)
+ self.write_file(self.folder_name, ""run.py"", run_restful)
+ elif answers.get(""type"") == ""Redis pubsub"":
+",startmicro/core/base.py,"ReplaceText(target='or' @(57,44)->(57,47))","class Command(object):
+ self.write_file(self.folder_name, ""docker-compose.yml"", docker_compose)
+ self.write_file(self.folder_name, ""Dockerfile"", Dockerfile)
+ self.write_file(self.folder_name, ""README.md"", readme)
+ if answers.get(""type"") == ""Restful"" and not answers:
+ self.write_file(self.api_path, ""producer.py"", producer_restful)
+ self.write_file(self.folder_name, ""run.py"", run_restful)
+ elif answers.get(""type"") == ""Redis pubsub"":","class Command(object):
+ self.write_file(self.folder_name, ""docker-compose.yml"", docker_compose)
+ self.write_file(self.folder_name, ""Dockerfile"", Dockerfile)
+ self.write_file(self.folder_name, ""README.md"", readme)
+ if answers.get(""type"") == ""Restful"" or not answers:
+ self.write_file(self.api_path, ""producer.py"", producer_restful)
+ self.write_file(self.folder_name, ""run.py"", run_restful)
+ elif answers.get(""type"") == ""Redis pubsub"":"
+1837,https://:@github.com/EdMan1022/PySpot.git,c5624d03bc367d65859ec67e2bee62464e212996,"@@ -17,4 +17,4 @@ class Auth(object):
+
+ :return: (Bool) True if expired, False if not
+ """"""
+- return self.expires_at > datetime.datetime.now()
++ return self.expires_at < datetime.datetime.now()
+",pyspot/auth.py,"ReplaceText(target='<' @(20,31)->(20,32))","class Auth(object):
+
+ :return: (Bool) True if expired, False if not
+ """"""
+ return self.expires_at > datetime.datetime.now()","class Auth(object):
+
+ :return: (Bool) True if expired, False if not
+ """"""
+ return self.expires_at < datetime.datetime.now()"
+1838,https://:@github.com/jolyonb/olxcleaner.git,775eed61ebf7b79e304f9012c5e9264bb7ec505f,"@@ -121,7 +121,7 @@ def traverse_course(edxobj, node, filename, errorstore, pointer=False):
+ try:
+ new_node = etree.parse(new_file).getroot()
+ except XMLSyntaxError as e:
+- errorstore.add_error(InvalidXML(filename, e.args[0]))
++ errorstore.add_error(InvalidXML(new_file, e.args[0]))
+ return
+ else:
+ traverse_course(edxobj, new_node, new_file, errorstore, pointer=True)
+",edx-xml-clean/loader/xml.py,"ReplaceText(target='new_file' @(124,44)->(124,52))","def traverse_course(edxobj, node, filename, errorstore, pointer=False):
+ try:
+ new_node = etree.parse(new_file).getroot()
+ except XMLSyntaxError as e:
+ errorstore.add_error(InvalidXML(filename, e.args[0]))
+ return
+ else:
+ traverse_course(edxobj, new_node, new_file, errorstore, pointer=True)","def traverse_course(edxobj, node, filename, errorstore, pointer=False):
+ try:
+ new_node = etree.parse(new_file).getroot()
+ except XMLSyntaxError as e:
+ errorstore.add_error(InvalidXML(new_file, e.args[0]))
+ return
+ else:
+ traverse_course(edxobj, new_node, new_file, errorstore, pointer=True)"
+1839,https://:@github.com/socek/confsave.git,6cb0b0b47e72f019cd92a4eddf8b2794c01b1e6e,"@@ -46,7 +46,7 @@ class Commands(object):
+ self._init_repo()
+ for filename in glob(self.app.get_home_path() + '/.*'):
+ endpoint = Endpoint(self.app, filename)
+- if not endpoint.is_visible():
++ if endpoint.is_visible():
+ print(endpoint.path)
+
+ def ignore(self, filename):
+",confsave/commands.py,"ReplaceText(target='' @(49,15)->(49,19))","class Commands(object):
+ self._init_repo()
+ for filename in glob(self.app.get_home_path() + '/.*'):
+ endpoint = Endpoint(self.app, filename)
+ if not endpoint.is_visible():
+ print(endpoint.path)
+
+ def ignore(self, filename):","class Commands(object):
+ self._init_repo()
+ for filename in glob(self.app.get_home_path() + '/.*'):
+ endpoint = Endpoint(self.app, filename)
+ if endpoint.is_visible():
+ print(endpoint.path)
+
+ def ignore(self, filename):"
+1840,https://:@github.com/asulibraries/django-asutheme.git,ab1982643a4145db1954d38d0a7088b8478bdbc6,"@@ -3,6 +3,6 @@ from django.conf import settings
+
+ def container_style(request):
+ classname = 'container'
+- if getattr('ASU_THEME_FLUID', settings, False):
++ if getattr(settings, 'ASU_THEME_FLUID', False):
+ classname += '-fluid'
+ return {'asutheme_container_class': classname}
+",asutheme/context_processors.py,"ArgSwap(idxs=0<->1 @(6,7)->(6,14))","from django.conf import settings
+
+ def container_style(request):
+ classname = 'container'
+ if getattr('ASU_THEME_FLUID', settings, False):
+ classname += '-fluid'
+ return {'asutheme_container_class': classname}","from django.conf import settings
+
+ def container_style(request):
+ classname = 'container'
+ if getattr(settings, 'ASU_THEME_FLUID', False):
+ classname += '-fluid'
+ return {'asutheme_container_class': classname}"
+1841,https://:@github.com/neuropoly/bids_neuropoly.git,aa37aa05e2ebff34631a0ec101749587d1d4b372,"@@ -73,7 +73,7 @@ def convert_dcm2nii(path_data, subject, path_out='./'):
+ # Build output file name
+ fname_out = os.path.join(subject, contrast_dict[contrast][1],
+ subject + '_' + contrast_dict[contrast][0] + '.'
+- + nii_file.split(os.extsep, 1)[1])
++ + nii_file_all_ext.split(os.extsep, 1)[1])
+ os.makedirs(os.path.abspath(os.path.dirname(fname_out)), exist_ok=True)
+ # Move
+ shutil.move(nii_file_all_ext, fname_out)
+",scripts/convert_dcm2nii.py,"ReplaceText(target='nii_file_all_ext' @(76,47)->(76,55))","def convert_dcm2nii(path_data, subject, path_out='./'):
+ # Build output file name
+ fname_out = os.path.join(subject, contrast_dict[contrast][1],
+ subject + '_' + contrast_dict[contrast][0] + '.'
+ + nii_file.split(os.extsep, 1)[1])
+ os.makedirs(os.path.abspath(os.path.dirname(fname_out)), exist_ok=True)
+ # Move
+ shutil.move(nii_file_all_ext, fname_out)","def convert_dcm2nii(path_data, subject, path_out='./'):
+ # Build output file name
+ fname_out = os.path.join(subject, contrast_dict[contrast][1],
+ subject + '_' + contrast_dict[contrast][0] + '.'
+ + nii_file_all_ext.split(os.extsep, 1)[1])
+ os.makedirs(os.path.abspath(os.path.dirname(fname_out)), exist_ok=True)
+ # Move
+ shutil.move(nii_file_all_ext, fname_out)"
+1842,https://:@github.com/cea-ufmg/sym2num.git,49bd276097ec6efaf8b5e33541f75f5cdae58d25,"@@ -152,7 +152,7 @@ def isstatic(arguments):
+ if len(arguments) == 0:
+ return True
+ elif not isinstance(arguments[0], var.SymbolObject):
+- return False
++ return True
+ else:
+ return 'cls' != arguments[0].name != 'self'
+
+",sym2num/function.py,"ReplaceText(target='True' @(155,15)->(155,20))","def isstatic(arguments):
+ if len(arguments) == 0:
+ return True
+ elif not isinstance(arguments[0], var.SymbolObject):
+ return False
+ else:
+ return 'cls' != arguments[0].name != 'self'
+ ","def isstatic(arguments):
+ if len(arguments) == 0:
+ return True
+ elif not isinstance(arguments[0], var.SymbolObject):
+ return True
+ else:
+ return 'cls' != arguments[0].name != 'self'
+ "
+1843,https://:@github.com/python-odin/baldr.git,fbce55b525f2fa4b171dc1b688bea4ca42b8a099,"@@ -212,7 +212,7 @@ class ResourceApiCommon(object):
+ except Exception as e:
+ # Special case when a request raises a 500 error. If we are in debug mode and a default is used (ie
+ # request does not explicitly specify a content type) fall back to the Django default exception page.
+- if settings.DEBUG and getattr(response_codec, 'is_default', False):
++ if settings.DEBUG and getattr(response_type, 'is_default', False):
+ raise
+ # Catch any other exceptions and pass them to the 500 handler for evaluation.
+ resource = self.handle_500(request, e)
+",baldr/api.py,"ReplaceText(target='response_type' @(215,46)->(215,60))","class ResourceApiCommon(object):
+ except Exception as e:
+ # Special case when a request raises a 500 error. If we are in debug mode and a default is used (ie
+ # request does not explicitly specify a content type) fall back to the Django default exception page.
+ if settings.DEBUG and getattr(response_codec, 'is_default', False):
+ raise
+ # Catch any other exceptions and pass them to the 500 handler for evaluation.
+ resource = self.handle_500(request, e)","class ResourceApiCommon(object):
+ except Exception as e:
+ # Special case when a request raises a 500 error. If we are in debug mode and a default is used (ie
+ # request does not explicitly specify a content type) fall back to the Django default exception page.
+ if settings.DEBUG and getattr(response_type, 'is_default', False):
+ raise
+ # Catch any other exceptions and pass them to the 500 handler for evaluation.
+ resource = self.handle_500(request, e)"
+1844,https://:@github.com/CallmeNezha/xmldiffs.git,51dab2722f963206b71bde197c283efb63079b49,"@@ -130,7 +130,7 @@ else:
+ def write_sorted_file(fpath, outdir=None, cfg=None):
+ if outdir is not None:
+ fbasename = os.path.splitext(os.path.basename(fpath))[0]
+- sorted_fpath = os.path.join(outdir, ""{}.cmp.xml"".format(fpath))
++ sorted_fpath = os.path.join(outdir, ""{}.cmp.xml"".format(fbasename))
+ tmp = unicode_writer(open(sorted_fpath, 'w'))
+ else:
+ tmp = unicode_writer(NamedTemporaryFile('w'))
+",xmldiffs/command_line.py,"ReplaceText(target='fbasename' @(133,64)->(133,69))","else:
+ def write_sorted_file(fpath, outdir=None, cfg=None):
+ if outdir is not None:
+ fbasename = os.path.splitext(os.path.basename(fpath))[0]
+ sorted_fpath = os.path.join(outdir, ""{}.cmp.xml"".format(fpath))
+ tmp = unicode_writer(open(sorted_fpath, 'w'))
+ else:
+ tmp = unicode_writer(NamedTemporaryFile('w'))","else:
+ def write_sorted_file(fpath, outdir=None, cfg=None):
+ if outdir is not None:
+ fbasename = os.path.splitext(os.path.basename(fpath))[0]
+ sorted_fpath = os.path.join(outdir, ""{}.cmp.xml"".format(fbasename))
+ tmp = unicode_writer(open(sorted_fpath, 'w'))
+ else:
+ tmp = unicode_writer(NamedTemporaryFile('w'))"
+1845,https://:@github.com/ahmed-shariff/ml-pipeline.git,2aa119fe99d2e96857754b56b601a82463f13c9c,"@@ -418,7 +418,7 @@ class Metric():
+ return 0
+
+ def get_tracking_delta(self):
+- if len(self.track_value_list) > self.track_average_epoc_count:
++ if len(self.track_value_list) == self.track_average_epoc_count:
+ return sum(
+ [self.track_value_list[idx + 1] -
+ self.track_value_list[idx]
+",mlpipeline/utils/_utils.py,"ReplaceText(target='==' @(421,38)->(421,39))","class Metric():
+ return 0
+
+ def get_tracking_delta(self):
+ if len(self.track_value_list) > self.track_average_epoc_count:
+ return sum(
+ [self.track_value_list[idx + 1] -
+ self.track_value_list[idx]","class Metric():
+ return 0
+
+ def get_tracking_delta(self):
+ if len(self.track_value_list) == self.track_average_epoc_count:
+ return sum(
+ [self.track_value_list[idx + 1] -
+ self.track_value_list[idx]"
+1846,https://:@github.com/rshk/jobcontrol.git,41187069493848c41741b1217b32aeb21e442c43,"@@ -112,7 +112,7 @@ class MemoryJobControl(JobControlBase):
+ if jrdef['job_id'] == job_id)
+
+ for jrid, jrdef in sorted(list(runs)):
+- yield jrdef
++ yield jrid
+
+ # ------------------------------------------------------------
+ # Logging
+",jobcontrol/ext/memory.py,"ReplaceText(target='jrid' @(115,18)->(115,23))","class MemoryJobControl(JobControlBase):
+ if jrdef['job_id'] == job_id)
+
+ for jrid, jrdef in sorted(list(runs)):
+ yield jrdef
+
+ # ------------------------------------------------------------
+ # Logging","class MemoryJobControl(JobControlBase):
+ if jrdef['job_id'] == job_id)
+
+ for jrid, jrdef in sorted(list(runs)):
+ yield jrid
+
+ # ------------------------------------------------------------
+ # Logging"
+1847,https://:@github.com/spatialucr/geosnap.git,73d2b50077271c9f3c530a52ef97890200c29751,"@@ -171,7 +171,7 @@ def harmonize(
+ profiles.append(profile)
+
+ if len(intensive_variables) > 0:
+- profile = pd.DataFrame(interpolation[1], columns=extensive_variables)
++ profile = pd.DataFrame(interpolation[1], columns=intensive_variables)
+ profiles.append(profile)
+
+ profile = pd.concat(profiles, sort=True)
+",geosnap/harmonize/harmonize.py,"ReplaceText(target='intensive_variables' @(174,61)->(174,80))","def harmonize(
+ profiles.append(profile)
+
+ if len(intensive_variables) > 0:
+ profile = pd.DataFrame(interpolation[1], columns=extensive_variables)
+ profiles.append(profile)
+
+ profile = pd.concat(profiles, sort=True)","def harmonize(
+ profiles.append(profile)
+
+ if len(intensive_variables) > 0:
+ profile = pd.DataFrame(interpolation[1], columns=intensive_variables)
+ profiles.append(profile)
+
+ profile = pd.concat(profiles, sort=True)"
+1848,https://:@github.com/stefanseefeld/faber.git,3cb344b107e599396c70e3e72488abbeff4af738,"@@ -416,7 +416,7 @@ def extend (name, values):
+ if __implicit_features.has_key(v):
+ raise BaseException (""'%s' is already associated with the feature '%s'"" % (v, __implicit_features [v]))
+
+- __implicit_features[v] = name
++ __implicit_features[v] = feature
+
+ if len (feature.values()) == 0 and len (values) > 0:
+ # This is the first value specified for this feature,
+",src/build/feature.py,"ReplaceText(target='feature' @(419,37)->(419,41))","def extend (name, values):
+ if __implicit_features.has_key(v):
+ raise BaseException (""'%s' is already associated with the feature '%s'"" % (v, __implicit_features [v]))
+
+ __implicit_features[v] = name
+
+ if len (feature.values()) == 0 and len (values) > 0:
+ # This is the first value specified for this feature,","def extend (name, values):
+ if __implicit_features.has_key(v):
+ raise BaseException (""'%s' is already associated with the feature '%s'"" % (v, __implicit_features [v]))
+
+ __implicit_features[v] = feature
+
+ if len (feature.values()) == 0 and len (values) > 0:
+ # This is the first value specified for this feature,"
+1849,https://:@github.com/stefanseefeld/faber.git,475c635167c32ee61b5951e2c1ba6a5613723437,"@@ -160,7 +160,7 @@ def refine (properties, requirements):
+ # Record them so that we can handle 'properties'.
+ for r in requirements:
+ # Don't consider conditional requirements.
+- if r.condition():
++ if not r.condition():
+ required[r.feature()] = r
+
+ for p in properties:
+",src/build/property.py,"ReplaceText(target='not ' @(163,11)->(163,11))","def refine (properties, requirements):
+ # Record them so that we can handle 'properties'.
+ for r in requirements:
+ # Don't consider conditional requirements.
+ if r.condition():
+ required[r.feature()] = r
+
+ for p in properties:","def refine (properties, requirements):
+ # Record them so that we can handle 'properties'.
+ for r in requirements:
+ # Don't consider conditional requirements.
+ if not r.condition():
+ required[r.feature()] = r
+
+ for p in properties:"
+1850,https://:@github.com/stefanseefeld/faber.git,632ab9c8665f96399b75d4c36b7e50db9cd05812,"@@ -362,7 +362,7 @@ def __add_flag (rule_or_module, variable_name, condition, values):
+ assert m
+ module = m.group(1)
+
+- __module_flags.setdefault(m, []).append(f)
++ __module_flags.setdefault(module, []).append(f)
+ __flags.setdefault(rule_or_module, []).append(f)
+
+ __requirements = []
+",src/build/toolset.py,"ReplaceText(target='module' @(365,30)->(365,31))","def __add_flag (rule_or_module, variable_name, condition, values):
+ assert m
+ module = m.group(1)
+
+ __module_flags.setdefault(m, []).append(f)
+ __flags.setdefault(rule_or_module, []).append(f)
+
+ __requirements = []","def __add_flag (rule_or_module, variable_name, condition, values):
+ assert m
+ module = m.group(1)
+
+ __module_flags.setdefault(module, []).append(f)
+ __flags.setdefault(rule_or_module, []).append(f)
+
+ __requirements = []"
+1851,https://:@github.com/ivirshup/ConsistentClusters.git,c2ad610430164fe7a56ce5d3f1f8357e1dd336bc,"@@ -518,7 +518,7 @@ def _call_get_edges(args):
+ def _get_edges(clustering1: np.array, clustering2: np.array):
+ edges = []
+ offset1 = clustering1.min()
+- offset2 = clustering1.min()
++ offset2 = clustering2.min()
+ # Because of how I've done unique node names, potentially this
+ # could be done in a more generic way by creating a mapping here.
+ offset_clusts1 = clustering1 - offset1
+",constclust/aggregate.py,"ReplaceText(target='clustering2' @(521,14)->(521,25))","def _call_get_edges(args):
+ def _get_edges(clustering1: np.array, clustering2: np.array):
+ edges = []
+ offset1 = clustering1.min()
+ offset2 = clustering1.min()
+ # Because of how I've done unique node names, potentially this
+ # could be done in a more generic way by creating a mapping here.
+ offset_clusts1 = clustering1 - offset1","def _call_get_edges(args):
+ def _get_edges(clustering1: np.array, clustering2: np.array):
+ edges = []
+ offset1 = clustering1.min()
+ offset2 = clustering2.min()
+ # Because of how I've done unique node names, potentially this
+ # could be done in a more generic way by creating a mapping here.
+ offset_clusts1 = clustering1 - offset1"
+1852,https://:@github.com/nowells/python-wellrested.git,8d016faf90f3a0d833cf9b1c52aaa66ee7de9514,"@@ -35,7 +35,7 @@ class RestClient(object):
+ request_body = self._serialize(data)
+ response_headers, response_content = self._connection.request(resource, method, args=args, body=request_body, headers=headers, content_type=self.content_type)
+ if response_headers.get('status') == HTTP_STATUS_OK:
+- data = self._deserialize(response_content)
++ response_data = self._deserialize(response_content)
+ return Response(response_headers, response_content, response_data)
+
+ def _serialize(self, data):
+",wellrested/connections/__init__.py,"ReplaceText(target='response_data' @(38,12)->(38,16))","class RestClient(object):
+ request_body = self._serialize(data)
+ response_headers, response_content = self._connection.request(resource, method, args=args, body=request_body, headers=headers, content_type=self.content_type)
+ if response_headers.get('status') == HTTP_STATUS_OK:
+ data = self._deserialize(response_content)
+ return Response(response_headers, response_content, response_data)
+
+ def _serialize(self, data):","class RestClient(object):
+ request_body = self._serialize(data)
+ response_headers, response_content = self._connection.request(resource, method, args=args, body=request_body, headers=headers, content_type=self.content_type)
+ if response_headers.get('status') == HTTP_STATUS_OK:
+ response_data = self._deserialize(response_content)
+ return Response(response_headers, response_content, response_data)
+
+ def _serialize(self, data):"
+1853,https://:@github.com/packagecontrol/st_package_reviewer.git,85b67bc0d381d382b2805e6464ab80eb31e2d484,"@@ -45,7 +45,7 @@ def main():
+ help=""URL to the repository or path to the package to be checked."")
+ parser.add_argument(""--repo-only"", action='store_true',
+ help=""Do not check the package itself and only its repository."")
+- parser.add_argument(""--verbose"", ""-v"", action='store_true',
++ parser.add_argument(""-v"", ""--verbose"", action='store_true',
+ help=""Increase verbosity."")
+ parser.add_argument(""--debug"", action='store_true',
+ help=""Enter pdb on excpetions. Implies --verbose."")
+",package_reviewer/__main__.py,"ArgSwap(idxs=0<->1 @(48,4)->(48,23))","def main():
+ help=""URL to the repository or path to the package to be checked."")
+ parser.add_argument(""--repo-only"", action='store_true',
+ help=""Do not check the package itself and only its repository."")
+ parser.add_argument(""--verbose"", ""-v"", action='store_true',
+ help=""Increase verbosity."")
+ parser.add_argument(""--debug"", action='store_true',
+ help=""Enter pdb on excpetions. Implies --verbose."")","def main():
+ help=""URL to the repository or path to the package to be checked."")
+ parser.add_argument(""--repo-only"", action='store_true',
+ help=""Do not check the package itself and only its repository."")
+ parser.add_argument(""-v"", ""--verbose"", action='store_true',
+ help=""Increase verbosity."")
+ parser.add_argument(""--debug"", action='store_true',
+ help=""Enter pdb on excpetions. Implies --verbose."")"
+1854,https://:@github.com/emilbjorklund/django-template-shortcodes.git,b2788b9d7fd1211de9666fd5c977274f8f343e30,"@@ -31,7 +31,7 @@ def parse(value, request):
+ try:
+ if cache.get(cache_key):
+ try:
+- parsed = re.sub(r'\[' + item + r'\]', cache.get(item), parsed)
++ parsed = re.sub(r'\[' + item + r'\]', cache.get(cache_key), parsed)
+ except:
+ pass
+ else:
+",shortcodes/parser.py,"ReplaceText(target='cache_key' @(34,58)->(34,62))","def parse(value, request):
+ try:
+ if cache.get(cache_key):
+ try:
+ parsed = re.sub(r'\[' + item + r'\]', cache.get(item), parsed)
+ except:
+ pass
+ else:","def parse(value, request):
+ try:
+ if cache.get(cache_key):
+ try:
+ parsed = re.sub(r'\[' + item + r'\]', cache.get(cache_key), parsed)
+ except:
+ pass
+ else:"
+1855,https://:@github.com/ods/aiochsa.git,24dcfdbc52b0a1009ce4a7b7ebcf72a1b26be18b,"@@ -61,7 +61,7 @@ class Client:
+ if response.status != 200:
+ body = await response.read()
+ raise DBException.from_message(
+- statement, body.decode(errors='replace'),
++ query, body.decode(errors='replace'),
+ )
+
+ if response.content_type == 'application/json':
+",aiochsa/client.py,"ReplaceText(target='query' @(64,20)->(64,29))","class Client:
+ if response.status != 200:
+ body = await response.read()
+ raise DBException.from_message(
+ statement, body.decode(errors='replace'),
+ )
+
+ if response.content_type == 'application/json':","class Client:
+ if response.status != 200:
+ body = await response.read()
+ raise DBException.from_message(
+ query, body.decode(errors='replace'),
+ )
+
+ if response.content_type == 'application/json':"
+1856,https://:@github.com/lega911/sqlmapper.git,cf7f674b0186e12ce37c5a9deb84e6b8d4d58919,"@@ -116,7 +116,7 @@ class MysqlTable(Table):
+ scolumn += ' AUTO_INCREMENT'
+
+ if default != NoValue:
+- if not_null or primary:
++ if auto_increment or primary:
+ raise ValueError('Can''t have default value')
+ scolumn += ' DEFAULT %s'
+ values.append(default)
+",sqlmapper/mysql.py,"ReplaceText(target='auto_increment' @(119,15)->(119,23))","class MysqlTable(Table):
+ scolumn += ' AUTO_INCREMENT'
+
+ if default != NoValue:
+ if not_null or primary:
+ raise ValueError('Can''t have default value')
+ scolumn += ' DEFAULT %s'
+ values.append(default)","class MysqlTable(Table):
+ scolumn += ' AUTO_INCREMENT'
+
+ if default != NoValue:
+ if auto_increment or primary:
+ raise ValueError('Can''t have default value')
+ scolumn += ' DEFAULT %s'
+ values.append(default)"
+1857,https://:@github.com/vanceeasleaf/aces.git,c4097285794c957a7242162570b41412be547ce0,"@@ -34,5 +34,5 @@ class Device(Material):
+ #atoms.center()
+ x=atoms.positions[:,0]
+
+- return atoms
++ return center
+
+",aces/runners/negf/device/device.py,"ReplaceText(target='center' @(37,9)->(37,14))","class Device(Material):
+ #atoms.center()
+ x=atoms.positions[:,0]
+
+ return atoms
+ ","class Device(Material):
+ #atoms.center()
+ x=atoms.positions[:,0]
+
+ return center
+ "
+1858,https://:@github.com/marcofavorito/temprl.git,1b0cb65d54ba2696fea2d41401990e406a8859f0,"@@ -195,7 +195,7 @@ def _compute_levels(dfa: DFA, property_states):
+ # levels for failure state (i.e. that cannot reach a final state)
+ failure_states = set()
+ for s in filter(lambda x: x not in z_current, dfa.states):
+- state2level[s] = max_level
++ state2level[s] = level
+ failure_states.add(s)
+
+ return state2level, max_level, failure_states
+",temprl/automata.py,"ReplaceText(target='level' @(198,25)->(198,34))","def _compute_levels(dfa: DFA, property_states):
+ # levels for failure state (i.e. that cannot reach a final state)
+ failure_states = set()
+ for s in filter(lambda x: x not in z_current, dfa.states):
+ state2level[s] = max_level
+ failure_states.add(s)
+
+ return state2level, max_level, failure_states","def _compute_levels(dfa: DFA, property_states):
+ # levels for failure state (i.e. that cannot reach a final state)
+ failure_states = set()
+ for s in filter(lambda x: x not in z_current, dfa.states):
+ state2level[s] = level
+ failure_states.add(s)
+
+ return state2level, max_level, failure_states"
+1859,https://:@github.com/equinor/stea.git,bdebfe3c0cb939db2dd7b1a39a029d00ffe555a9,"@@ -82,5 +82,5 @@ def calculate(stea_input):
+
+ request.add_profile(profile_id, start_year, data)
+
+- return SteaResult(client.calculate(request), project)
++ return SteaResult(client.calculate(request), stea_input)
+
+",stea/__init__.py,"ReplaceText(target='stea_input' @(85,49)->(85,56))","def calculate(stea_input):
+
+ request.add_profile(profile_id, start_year, data)
+
+ return SteaResult(client.calculate(request), project)
+ ","def calculate(stea_input):
+
+ request.add_profile(profile_id, start_year, data)
+
+ return SteaResult(client.calculate(request), stea_input)
+ "
+1860,https://:@github.com/tandonneur/AdvancedAnalytics.git,4a73a8c616db33f69c5361eca1f4ca18ca7a2b17,"@@ -710,7 +710,7 @@ class tree_classifier(object):
+ print(fstr2.format('Class ', dt.classes_[i]), end="""")
+
+ for j in range(n_classes):
+- print(""{:>10d}"".format(conf_mat_t[i][j]), end="""")
++ print(""{:>10d}"".format(conf_mat_v[i][j]), end="""")
+ print("""")
+ print("""")
+
+",AdvancedAnalytics/Tree.py,"ReplaceText(target='conf_mat_v' @(713,43)->(713,53))","class tree_classifier(object):
+ print(fstr2.format('Class ', dt.classes_[i]), end="""")
+
+ for j in range(n_classes):
+ print(""{:>10d}"".format(conf_mat_t[i][j]), end="""")
+ print("""")
+ print("""")
+ ","class tree_classifier(object):
+ print(fstr2.format('Class ', dt.classes_[i]), end="""")
+
+ for j in range(n_classes):
+ print(""{:>10d}"".format(conf_mat_v[i][j]), end="""")
+ print("""")
+ print("""")
+ "
+1861,https://:@github.com/usc-isi-i2/dsbox-cleaning.git,961d92886916dfbc0a0e1bfd2a51e9c4677301f7,"@@ -342,7 +342,7 @@ class Profiler(TransformerPrimitiveBase[Input, Output, Hyperparams]):
+ inputs.iloc[:, col] = numerics
+ else:
+ if ""http://schema.org/Float"" not in old_metadata['semantic_types']:
+- old_metadata['semantic_types'] = (""http://schema.org/Float"",)
++ old_metadata['semantic_types'] += (""http://schema.org/Float"",)
+ old_metadata['structural_type'] = type(10.2)
+ inputs.iloc[:, col] = numerics
+
+",dsbox/datapreprocessing/cleaner/data_profile.py,"ReplaceText(target='+=' @(345,63)->(345,64))","class Profiler(TransformerPrimitiveBase[Input, Output, Hyperparams]):
+ inputs.iloc[:, col] = numerics
+ else:
+ if ""http://schema.org/Float"" not in old_metadata['semantic_types']:
+ old_metadata['semantic_types'] = (""http://schema.org/Float"",)
+ old_metadata['structural_type'] = type(10.2)
+ inputs.iloc[:, col] = numerics
+ ","class Profiler(TransformerPrimitiveBase[Input, Output, Hyperparams]):
+ inputs.iloc[:, col] = numerics
+ else:
+ if ""http://schema.org/Float"" not in old_metadata['semantic_types']:
+ old_metadata['semantic_types'] += (""http://schema.org/Float"",)
+ old_metadata['structural_type'] = type(10.2)
+ inputs.iloc[:, col] = numerics
+ "
+1862,https://:@github.com/azavea/djsonb.git,90e97fc29ca5df0cc56b3193c9f7a4a1543111b5,"@@ -72,7 +72,7 @@ class FilterTree:
+ sql_tuple = FilterTree.text_similarity_filter(rule[0], pattern, True)
+ else:
+ sql_tuple = FilterTree.text_similarity_filter(rule[0], pattern, False)
+- pattern_specs.append(sql_tuple)
++ rule_specs.append(sql_tuple)
+
+ rule_strings = [' AND '.join([rule[0] for rule in rule_specs]),
+ ' OR '.join([rule[0] for rule in pattern_specs])]
+",djsonb/lookups.py,"ReplaceText(target='rule_specs' @(75,20)->(75,33))","class FilterTree:
+ sql_tuple = FilterTree.text_similarity_filter(rule[0], pattern, True)
+ else:
+ sql_tuple = FilterTree.text_similarity_filter(rule[0], pattern, False)
+ pattern_specs.append(sql_tuple)
+
+ rule_strings = [' AND '.join([rule[0] for rule in rule_specs]),
+ ' OR '.join([rule[0] for rule in pattern_specs])]","class FilterTree:
+ sql_tuple = FilterTree.text_similarity_filter(rule[0], pattern, True)
+ else:
+ sql_tuple = FilterTree.text_similarity_filter(rule[0], pattern, False)
+ rule_specs.append(sql_tuple)
+
+ rule_strings = [' AND '.join([rule[0] for rule in rule_specs]),
+ ' OR '.join([rule[0] for rule in pattern_specs])]"
+1863,https://:@github.com/ionelmc/python-pth.git,5e8cbdd87050b06018ef04cc994d8dc155931e98,"@@ -235,7 +235,7 @@ class Path(AbstractPath):
+ normpath = property(lambda self: pth(ospath.normpath(self)))
+ norm = property(lambda self: pth(ospath.normcase(ospath.normpath(self))))
+ real = realpath = property(lambda self: pth(ospath.realpath(self)))
+- rel = relpath = lambda self, start: pth(ospath.relpath(self, start))
++ rel = relpath = lambda self, start: pth(ospath.relpath(start, self))
+ same = samefile = lambda self, other: ospath.samefile(self, other)
+ if hasattr(os, 'link'):
+ if PY33:
+",src/pth.py,"ArgSwap(idxs=0<->1 @(238,44)->(238,58))","class Path(AbstractPath):
+ normpath = property(lambda self: pth(ospath.normpath(self)))
+ norm = property(lambda self: pth(ospath.normcase(ospath.normpath(self))))
+ real = realpath = property(lambda self: pth(ospath.realpath(self)))
+ rel = relpath = lambda self, start: pth(ospath.relpath(self, start))
+ same = samefile = lambda self, other: ospath.samefile(self, other)
+ if hasattr(os, 'link'):
+ if PY33:","class Path(AbstractPath):
+ normpath = property(lambda self: pth(ospath.normpath(self)))
+ norm = property(lambda self: pth(ospath.normcase(ospath.normpath(self))))
+ real = realpath = property(lambda self: pth(ospath.realpath(self)))
+ rel = relpath = lambda self, start: pth(ospath.relpath(start, self))
+ same = samefile = lambda self, other: ospath.samefile(self, other)
+ if hasattr(os, 'link'):
+ if PY33:"
+1864,https://:@github.com/savex/tempest-parser.git,8c2ad3b8d13573924408bf3d2bf50ddc05fdd3d8,"@@ -33,7 +33,7 @@ def get_date_from_source(source):
+ # _ctime = time.strftime(""%d/%m/%Y %H:%M"", time.gmtime(ctime))
+ return time.strftime(
+ ""%d/%m/%Y %H:%M GMT"",
+- time.gmtime(ctime)
++ time.gmtime(mtime)
+ )
+
+
+",tempest_parser/manager/importers.py,"ReplaceText(target='mtime' @(36,20)->(36,25))","def get_date_from_source(source):
+ # _ctime = time.strftime(""%d/%m/%Y %H:%M"", time.gmtime(ctime))
+ return time.strftime(
+ ""%d/%m/%Y %H:%M GMT"",
+ time.gmtime(ctime)
+ )
+
+ ","def get_date_from_source(source):
+ # _ctime = time.strftime(""%d/%m/%Y %H:%M"", time.gmtime(ctime))
+ return time.strftime(
+ ""%d/%m/%Y %H:%M GMT"",
+ time.gmtime(mtime)
+ )
+
+ "
+1865,https://:@github.com/solidfire/solidfire-cli.git,fcb6c5f4abbe9cc7ef2c6dded6d2d7fb2492f931,"@@ -88,5 +88,5 @@ def remove(ctx, name=None, index=None):
+ if(name is None and index is not None):
+ cli_utils.print_result(connections[int(index)], ctx.logger, as_json=ctx.json, as_pickle=ctx.pickle, depth=ctx.depth, filter_tree=ctx.filter_tree)
+ if(name is not None and index is None):
+- connections = [connection for connection in connections if connection[""name""]!=name]
++ connections = [connection for connection in connections if connection[""name""]==name]
+ cli_utils.print_result(connections, ctx.logger, as_json=ctx.json, as_pickle=ctx.pickle, depth=ctx.depth, filter_tree=ctx.filter_tree)
+",element/cli/commands/cmd_connection.py,"ReplaceText(target='==' @(91,85)->(91,87))","def remove(ctx, name=None, index=None):
+ if(name is None and index is not None):
+ cli_utils.print_result(connections[int(index)], ctx.logger, as_json=ctx.json, as_pickle=ctx.pickle, depth=ctx.depth, filter_tree=ctx.filter_tree)
+ if(name is not None and index is None):
+ connections = [connection for connection in connections if connection[""name""]!=name]
+ cli_utils.print_result(connections, ctx.logger, as_json=ctx.json, as_pickle=ctx.pickle, depth=ctx.depth, filter_tree=ctx.filter_tree)","def remove(ctx, name=None, index=None):
+ if(name is None and index is not None):
+ cli_utils.print_result(connections[int(index)], ctx.logger, as_json=ctx.json, as_pickle=ctx.pickle, depth=ctx.depth, filter_tree=ctx.filter_tree)
+ if(name is not None and index is None):
+ connections = [connection for connection in connections if connection[""name""]==name]
+ cli_utils.print_result(connections, ctx.logger, as_json=ctx.json, as_pickle=ctx.pickle, depth=ctx.depth, filter_tree=ctx.filter_tree)"
+1866,https://:@github.com/glimix/numpy-sugar.git,59fb36f9110b7ac9ae2ce6e06d443c7d44aac42f,"@@ -50,7 +50,7 @@ def ddot(L, R, left=True, out=None):
+ else:
+ if out is None:
+ out = copy(L)
+- return multiply(out, R, out=out)
++ return multiply(L, R, out=out)
+
+
+ def cdot(L, out=None):
+",numpy_sugar/linalg/dot.py,"ReplaceText(target='L' @(53,24)->(53,27))","def ddot(L, R, left=True, out=None):
+ else:
+ if out is None:
+ out = copy(L)
+ return multiply(out, R, out=out)
+
+
+ def cdot(L, out=None):","def ddot(L, R, left=True, out=None):
+ else:
+ if out is None:
+ out = copy(L)
+ return multiply(L, R, out=out)
+
+
+ def cdot(L, out=None):"
+1867,https://:@github.com/kuzmoyev/Google-Calendar-Simple-API.git,9a902a5ce43d8dc2b18c53b8140443a2a99c2810,"@@ -474,7 +474,7 @@ class Recurrence:
+ if freq not in (HOURLY, MINUTELY, DAILY, WEEKLY, MONTHLY, YEARLY):
+ raise ValueError('""freq"" parameter must be one of HOURLY, MINUTELY, DAILY, WEEKLY, MONTHLY or YEARLY. '
+ '{} was provided'.format(freq))
+- if interval and (isinstance(interval, int) or interval < 1):
++ if interval and (not isinstance(interval, int) or interval < 1):
+ raise ValueError('""interval"" parameter must be a positive int. '
+ '{} was provided'.format(interval))
+ if count and (not isinstance(count, int) or count < 1):
+",gcsa/recurrence.py,"ReplaceText(target='not ' @(477,25)->(477,25))","class Recurrence:
+ if freq not in (HOURLY, MINUTELY, DAILY, WEEKLY, MONTHLY, YEARLY):
+ raise ValueError('""freq"" parameter must be one of HOURLY, MINUTELY, DAILY, WEEKLY, MONTHLY or YEARLY. '
+ '{} was provided'.format(freq))
+ if interval and (isinstance(interval, int) or interval < 1):
+ raise ValueError('""interval"" parameter must be a positive int. '
+ '{} was provided'.format(interval))
+ if count and (not isinstance(count, int) or count < 1):","class Recurrence:
+ if freq not in (HOURLY, MINUTELY, DAILY, WEEKLY, MONTHLY, YEARLY):
+ raise ValueError('""freq"" parameter must be one of HOURLY, MINUTELY, DAILY, WEEKLY, MONTHLY or YEARLY. '
+ '{} was provided'.format(freq))
+ if interval and (not isinstance(interval, int) or interval < 1):
+ raise ValueError('""interval"" parameter must be a positive int. '
+ '{} was provided'.format(interval))
+ if count and (not isinstance(count, int) or count < 1):"
+1868,https://:@github.com/NFontrodona/Lazyparser.git,8e3888ea5248c4f1e599bff0bd40b4e96c58e92f,"@@ -383,7 +383,7 @@ def set_env(delim1, delim2, hd, tb):
+ :param hd: (string) the header of parameter
+ :param tb: (int) the number of space/tab that bedore the docstring
+ """"""
+- if isinstance(int, tb):
++ if isinstance(tb, int):
+ global tab
+ tab = tb
+ else:
+",src/lazyparser.py,"ArgSwap(idxs=0<->1 @(386,7)->(386,17))","def set_env(delim1, delim2, hd, tb):
+ :param hd: (string) the header of parameter
+ :param tb: (int) the number of space/tab that bedore the docstring
+ """"""
+ if isinstance(int, tb):
+ global tab
+ tab = tb
+ else:","def set_env(delim1, delim2, hd, tb):
+ :param hd: (string) the header of parameter
+ :param tb: (int) the number of space/tab that bedore the docstring
+ """"""
+ if isinstance(tb, int):
+ global tab
+ tab = tb
+ else:"
+1869,https://:@github.com/mikemill/rq_retry_scheduler.git,d279c059418831f33d588d963252de0610cb17a7,"@@ -59,7 +59,7 @@ class Scheduler(object):
+
+ def delay_job(self, job, time_delta):
+ amount = int(time_delta.total_seconds())
+- self.connection.zincrby(self.scheduler_jobs_key, job.id, amount)
++ self.connection.zincrby(self.scheduler_jobs_key, amount, job.id)
+
+ def should_repeat_job(self, job):
+ max_runs = job.meta['max_runs']
+",rq_retry_scheduler/scheduler.py,"ArgSwap(idxs=1<->2 @(62,8)->(62,31))","class Scheduler(object):
+
+ def delay_job(self, job, time_delta):
+ amount = int(time_delta.total_seconds())
+ self.connection.zincrby(self.scheduler_jobs_key, job.id, amount)
+
+ def should_repeat_job(self, job):
+ max_runs = job.meta['max_runs']","class Scheduler(object):
+
+ def delay_job(self, job, time_delta):
+ amount = int(time_delta.total_seconds())
+ self.connection.zincrby(self.scheduler_jobs_key, amount, job.id)
+
+ def should_repeat_job(self, job):
+ max_runs = job.meta['max_runs']"
+1870,https://:@github.com/jbaber/pedigree.git,d4f17753d97d279e2845e1b5569c8f5f99fa9939,"@@ -633,7 +633,7 @@ def toml_to_family(toml_filename):
+ for relation in big_dict['spouse']
+ if relation[0] == spouse_uid
+ ]
+- family.add_spouses(spouse, children)
++ family.add_spouses(spouse, spouses)
+
+ return family
+
+",src/pedigree/pedigree_lib.py,"ReplaceText(target='spouses' @(636,31)->(636,39))","def toml_to_family(toml_filename):
+ for relation in big_dict['spouse']
+ if relation[0] == spouse_uid
+ ]
+ family.add_spouses(spouse, children)
+
+ return family
+ ","def toml_to_family(toml_filename):
+ for relation in big_dict['spouse']
+ if relation[0] == spouse_uid
+ ]
+ family.add_spouses(spouse, spouses)
+
+ return family
+ "
+1871,https://:@github.com/wayne-li2/Flask-User.git,928e09cff2d773d5f2cbfa1ed847e32b1b5eae07,"@@ -83,7 +83,7 @@ def test_roles(db):
+ role1 = db_adapter.find_first_object(RoleClass, name='Role 1')
+ db_adapter.delete_object(role1)
+ role2 = db_adapter.find_first_object(RoleClass, name='Role 2')
+- db_adapter.delete_object(role1)
++ db_adapter.delete_object(role2)
+
+ db_adapter.commit()
+
+",flask_user/tests/test_roles.py,"ReplaceText(target='role2' @(86,33)->(86,38))","def test_roles(db):
+ role1 = db_adapter.find_first_object(RoleClass, name='Role 1')
+ db_adapter.delete_object(role1)
+ role2 = db_adapter.find_first_object(RoleClass, name='Role 2')
+ db_adapter.delete_object(role1)
+
+ db_adapter.commit()
+ ","def test_roles(db):
+ role1 = db_adapter.find_first_object(RoleClass, name='Role 1')
+ db_adapter.delete_object(role1)
+ role2 = db_adapter.find_first_object(RoleClass, name='Role 2')
+ db_adapter.delete_object(role2)
+
+ db_adapter.commit()
+ "
+1872,https://:@github.com/manodeep/astro3D.git,38bca8c32c783779f5ddd2bfab66ec69427f4d12,"@@ -117,7 +117,7 @@ def test_sorted_order(opt):
+ return False
+
+ if (outer_sort == outer_sort_next):
+- if (inner_sort > inner_sort_next):
++ if (inner_sort < inner_sort_next):
+ print(""For Halo ID {0} we had a {1} of {2}. After sorting via lexsort ""
+ ""inner-key {1}, the next Halo has ID {3} and a {1} of {4}""
+ .format(halo_id, opt[""sort_mass""], inner_sort, halo_id_next,
+",tests/tests.py,"ReplaceText(target='<' @(120,35)->(120,36))","def test_sorted_order(opt):
+ return False
+
+ if (outer_sort == outer_sort_next):
+ if (inner_sort > inner_sort_next):
+ print(""For Halo ID {0} we had a {1} of {2}. After sorting via lexsort ""
+ ""inner-key {1}, the next Halo has ID {3} and a {1} of {4}""
+ .format(halo_id, opt[""sort_mass""], inner_sort, halo_id_next,","def test_sorted_order(opt):
+ return False
+
+ if (outer_sort == outer_sort_next):
+ if (inner_sort < inner_sort_next):
+ print(""For Halo ID {0} we had a {1} of {2}. After sorting via lexsort ""
+ ""inner-key {1}, the next Halo has ID {3} and a {1} of {4}""
+ .format(halo_id, opt[""sort_mass""], inner_sort, halo_id_next,"
+1873,https://:@github.com/manodeep/astro3D.git,69e10a4b7b50701e65a9ca0f6782fc2654987588,"@@ -119,7 +119,7 @@ def my_test_sorted_order(opt):
+ pytest.fail()
+
+ if (outer_sort == outer_sort_next):
+- if (inner_sort < inner_sort_next):
++ if (inner_sort > inner_sort_next):
+ print(""For Halo ID {0} we had a {1} of {2}. After sorting via lexsort ""
+ ""inner-key {1}, the next Halo has ID {3} and a {1} of {4}""
+ .format(halo_id, opt[""sort_mass""], inner_sort, halo_id_next,
+",tests/forest_sorter_test.py,"ReplaceText(target='>' @(122,35)->(122,36))","def my_test_sorted_order(opt):
+ pytest.fail()
+
+ if (outer_sort == outer_sort_next):
+ if (inner_sort < inner_sort_next):
+ print(""For Halo ID {0} we had a {1} of {2}. After sorting via lexsort ""
+ ""inner-key {1}, the next Halo has ID {3} and a {1} of {4}""
+ .format(halo_id, opt[""sort_mass""], inner_sort, halo_id_next,","def my_test_sorted_order(opt):
+ pytest.fail()
+
+ if (outer_sort == outer_sort_next):
+ if (inner_sort > inner_sort_next):
+ print(""For Halo ID {0} we had a {1} of {2}. After sorting via lexsort ""
+ ""inner-key {1}, the next Halo has ID {3} and a {1} of {4}""
+ .format(halo_id, opt[""sort_mass""], inner_sort, halo_id_next,"
+1874,https://:@github.com/kazenniy/atapt.git,993a7734447b17a5d96db5428b267556f90b10b4,"@@ -416,7 +416,7 @@ class atapt:
+
+ # word 83 ""Commands and feature sets supported""
+ features = int.from_bytes(buf[166] + buf[167], byteorder='little')
+- if major & 0x400:
++ if features & 0x400:
+ self.lba48bit = True
+ else:
+ self.lba48bit = False
+",atapt/atapt.py,"ReplaceText(target='features' @(419,11)->(419,16))","class atapt:
+
+ # word 83 ""Commands and feature sets supported""
+ features = int.from_bytes(buf[166] + buf[167], byteorder='little')
+ if major & 0x400:
+ self.lba48bit = True
+ else:
+ self.lba48bit = False","class atapt:
+
+ # word 83 ""Commands and feature sets supported""
+ features = int.from_bytes(buf[166] + buf[167], byteorder='little')
+ if features & 0x400:
+ self.lba48bit = True
+ else:
+ self.lba48bit = False"
+1875,https://:@github.com/RI-imaging/DryMass.git,d92c19314359ae4e3b4feb0136bc649840cf57a7,"@@ -221,7 +221,7 @@ def plot_qpi_sphere(qpi_real, qpi_sim, path=None, simtype=""simulation""):
+ plt.tight_layout(rect=(0, 0, 1, .95))
+
+ # add identifier
+- fig.text(x=.5, y=.99, s=qpi_real[""identifier""],
++ fig.text(x=.5, y=.99, s=qpi_sim[""identifier""],
+ verticalalignment=""top"",
+ horizontalalignment=""center"",
+ fontsize=14)
+",drymass/plot.py,"ReplaceText(target='qpi_sim' @(224,28)->(224,36))","def plot_qpi_sphere(qpi_real, qpi_sim, path=None, simtype=""simulation""):
+ plt.tight_layout(rect=(0, 0, 1, .95))
+
+ # add identifier
+ fig.text(x=.5, y=.99, s=qpi_real[""identifier""],
+ verticalalignment=""top"",
+ horizontalalignment=""center"",
+ fontsize=14)","def plot_qpi_sphere(qpi_real, qpi_sim, path=None, simtype=""simulation""):
+ plt.tight_layout(rect=(0, 0, 1, .95))
+
+ # add identifier
+ fig.text(x=.5, y=.99, s=qpi_sim[""identifier""],
+ verticalalignment=""top"",
+ horizontalalignment=""center"",
+ fontsize=14)"
+1876,https://:@github.com/lazaret/anuket.git,6f069e0d5d6498048990cacd743cd5d63e0e84fa,"@@ -59,7 +59,7 @@ class UniqueAuthEmail(validators.FancyValidator):
+ user_id = values['user_id']
+ else:
+ user_id = None
+- if email and (user.user_id != user_id):
++ if user and (user.user_id != user_id):
+ errors = {'email': self.message('not_unique_email', state)}
+ raise Invalid(self.message('not_unique_email', state),
+ values, state, error_dict=errors)
+",wepwawet/lib/validators.py,"ReplaceText(target='user' @(62,15)->(62,20))","class UniqueAuthEmail(validators.FancyValidator):
+ user_id = values['user_id']
+ else:
+ user_id = None
+ if email and (user.user_id != user_id):
+ errors = {'email': self.message('not_unique_email', state)}
+ raise Invalid(self.message('not_unique_email', state),
+ values, state, error_dict=errors)","class UniqueAuthEmail(validators.FancyValidator):
+ user_id = values['user_id']
+ else:
+ user_id = None
+ if user and (user.user_id != user_id):
+ errors = {'email': self.message('not_unique_email', state)}
+ raise Invalid(self.message('not_unique_email', state),
+ values, state, error_dict=errors)"
+1877,https://:@github.com/esteinig/dartqc.git,b98781ae43cc97f8df60a703a594395ddca18d87,"@@ -292,7 +292,7 @@ class CommandLine:
+
+ for value in [command[""maf""], command[""call""], command[""rep""], command[""seq_identity""]]:
+ if value != -1:
+- if value < 1 or value > 1:
++ if value < 0 or value > 1:
+ raise ValueError(""Filter and identity thresholds must be larger >= 0 and <= 1."")
+
+ for value in [command[""clone_selector""], command[""identity_selector""]]:
+",dart_qc.py,"ReplaceText(target='0' @(295,27)->(295,28))","class CommandLine:
+
+ for value in [command[""maf""], command[""call""], command[""rep""], command[""seq_identity""]]:
+ if value != -1:
+ if value < 1 or value > 1:
+ raise ValueError(""Filter and identity thresholds must be larger >= 0 and <= 1."")
+
+ for value in [command[""clone_selector""], command[""identity_selector""]]:","class CommandLine:
+
+ for value in [command[""maf""], command[""call""], command[""rep""], command[""seq_identity""]]:
+ if value != -1:
+ if value < 0 or value > 1:
+ raise ValueError(""Filter and identity thresholds must be larger >= 0 and <= 1."")
+
+ for value in [command[""clone_selector""], command[""identity_selector""]]:"
+1878,https://:@github.com/dmentipl/phantom-build.git,09e3fcdf5c2ca013f55ec9d9d4af396c99b655f8,"@@ -387,7 +387,7 @@ def setup_calculation(
+ raise SetupError(msg)
+ else:
+ logger.info('Successfully set up Phantom calculation')
+- logger.info(f'run_path: {run_path}')
++ logger.info(f'run_path: {_run_path}')
+
+ shutil.copy(_in_file, _run_path)
+
+",phantombuild/phantombuild.py,"ReplaceText(target='_run_path' @(390,33)->(390,41))","def setup_calculation(
+ raise SetupError(msg)
+ else:
+ logger.info('Successfully set up Phantom calculation')
+ logger.info(f'run_path: {run_path}')
+
+ shutil.copy(_in_file, _run_path)
+ ","def setup_calculation(
+ raise SetupError(msg)
+ else:
+ logger.info('Successfully set up Phantom calculation')
+ logger.info(f'run_path: {_run_path}')
+
+ shutil.copy(_in_file, _run_path)
+ "
+1879,https://:@github.com/shane-breeze/zinv-analysis.git,206e736a62c914f577717679adc3f16b9fa1d6b7,"@@ -36,7 +36,7 @@ class EventSumsProducer(object):
+ event.METnoX_diMuonParaProjPt_Minus_DiMuon_pt = dimu_para - dimu_pt
+ event.METnoX_diMuonPerpProjPt_Plus_DiMuon_pt = dimu_perp + dimu_pt
+ event.METnoX_diMuonParaProjPt_Div_DiMuon_pt = dimu_para / dimu_pt
+- event.METnoX_diMuonPerpProjPt_Plus_DiMuon_pt_Div_DiMuon_pt = (dimu_para + dimu_pt) / dimu_pt
++ event.METnoX_diMuonPerpProjPt_Plus_DiMuon_pt_Div_DiMuon_pt = (dimu_perp + dimu_pt) / dimu_pt
+
+ # MHT
+ ht, mht, mhphi = create_mht(
+",sequence/Readers/EventSumsProducer.py,"ReplaceText(target='dimu_perp' @(39,70)->(39,79))","class EventSumsProducer(object):
+ event.METnoX_diMuonParaProjPt_Minus_DiMuon_pt = dimu_para - dimu_pt
+ event.METnoX_diMuonPerpProjPt_Plus_DiMuon_pt = dimu_perp + dimu_pt
+ event.METnoX_diMuonParaProjPt_Div_DiMuon_pt = dimu_para / dimu_pt
+ event.METnoX_diMuonPerpProjPt_Plus_DiMuon_pt_Div_DiMuon_pt = (dimu_para + dimu_pt) / dimu_pt
+
+ # MHT
+ ht, mht, mhphi = create_mht(","class EventSumsProducer(object):
+ event.METnoX_diMuonParaProjPt_Minus_DiMuon_pt = dimu_para - dimu_pt
+ event.METnoX_diMuonPerpProjPt_Plus_DiMuon_pt = dimu_perp + dimu_pt
+ event.METnoX_diMuonParaProjPt_Div_DiMuon_pt = dimu_para / dimu_pt
+ event.METnoX_diMuonPerpProjPt_Plus_DiMuon_pt_Div_DiMuon_pt = (dimu_perp + dimu_pt) / dimu_pt
+
+ # MHT
+ ht, mht, mhphi = create_mht("
+1880,https://:@github.com/mbr/ragstoriches.git,a99ce338a03bc04bf4f6045b5e18c590177bb3ef,"@@ -78,7 +78,7 @@ def run_scraper():
+ scraper = obj
+
+ for name, obj in getattr(mod, '_rr_export', {}).iteritems():
+- scope[name] = name
++ scope[name] = obj
+
+ scraper.scrape(url=args.url,
+ scraper_name=args.scraper,
+",ragstoriches/apps.py,"ReplaceText(target='obj' @(81,29)->(81,33))","def run_scraper():
+ scraper = obj
+
+ for name, obj in getattr(mod, '_rr_export', {}).iteritems():
+ scope[name] = name
+
+ scraper.scrape(url=args.url,
+ scraper_name=args.scraper,","def run_scraper():
+ scraper = obj
+
+ for name, obj in getattr(mod, '_rr_export', {}).iteritems():
+ scope[name] = obj
+
+ scraper.scrape(url=args.url,
+ scraper_name=args.scraper,"
+1881,https://:@github.com/NickYi1990/Kaggle_Buddy.git,e461b1afe43f676923157628cb528833cf480882,"@@ -83,7 +83,7 @@ class callbacks_keras:
+ if epoch%self.decay_after_n_epoch==0 and epoch!=0:
+ lr = K.get_value(self.model.optimizer.lr)
+ K.set_value(self.model.optimizer.lr, lr*self.decay_rate)
+- print(""lr changed to {}"".format(lr**self.decay_rate))
++ print(""lr changed to {}"".format(lr*self.decay_rate))
+ return K.get_value(self.model.optimizer.lr)
+
+ def ka_xgb_r2_error(preds, dtrain):
+",Utils/KA_utils.py,"ReplaceText(target='*' @(86,46)->(86,48))","class callbacks_keras:
+ if epoch%self.decay_after_n_epoch==0 and epoch!=0:
+ lr = K.get_value(self.model.optimizer.lr)
+ K.set_value(self.model.optimizer.lr, lr*self.decay_rate)
+ print(""lr changed to {}"".format(lr**self.decay_rate))
+ return K.get_value(self.model.optimizer.lr)
+
+ def ka_xgb_r2_error(preds, dtrain):","class callbacks_keras:
+ if epoch%self.decay_after_n_epoch==0 and epoch!=0:
+ lr = K.get_value(self.model.optimizer.lr)
+ K.set_value(self.model.optimizer.lr, lr*self.decay_rate)
+ print(""lr changed to {}"".format(lr*self.decay_rate))
+ return K.get_value(self.model.optimizer.lr)
+
+ def ka_xgb_r2_error(preds, dtrain):"
+1882,https://:@github.com/Qingluan/QmongoHelper.git,67bf4fbd01beddd456583429cc428b4aeb1c2025,"@@ -69,7 +69,7 @@ class dbhelper(object):
+
+ @_run
+ def update(self,document,target,**kargs):
+- self._db[document].update(kargs,target,callback=self.callback)
++ self._db[document].update(target,kargs,callback=self.callback)
+
+
+ # def to_list_callback(self,infos,error):
+",__db.py,"ArgSwap(idxs=0<->1 @(72,8)->(72,33))","class dbhelper(object):
+
+ @_run
+ def update(self,document,target,**kargs):
+ self._db[document].update(kargs,target,callback=self.callback)
+
+
+ # def to_list_callback(self,infos,error):","class dbhelper(object):
+
+ @_run
+ def update(self,document,target,**kargs):
+ self._db[document].update(target,kargs,callback=self.callback)
+
+
+ # def to_list_callback(self,infos,error):"
+1883,https://:@github.com/abelcarreras/aiida_extensions.git,90d585773141882b4c16bca8aa6ecdea3ca34072,"@@ -224,7 +224,7 @@ class OptimizeCalculation(JobCalculation):
+
+
+ structure_txt = generate_LAMMPS_structure(structure)
+- input_txt = generate_LAMMPS_input(potential_data,
++ input_txt = generate_LAMMPS_input(potential_object,
+ parameters_data,
+ structure_file=self._INPUT_STRUCTURE,
+ optimize_path_file=self._OUTPUT_TRAJECTORY_FILE_NAME)
+",plugins/jobs/lammps/optimize.py,"ReplaceText(target='potential_object' @(227,42)->(227,56))","class OptimizeCalculation(JobCalculation):
+
+
+ structure_txt = generate_LAMMPS_structure(structure)
+ input_txt = generate_LAMMPS_input(potential_data,
+ parameters_data,
+ structure_file=self._INPUT_STRUCTURE,
+ optimize_path_file=self._OUTPUT_TRAJECTORY_FILE_NAME)","class OptimizeCalculation(JobCalculation):
+
+
+ structure_txt = generate_LAMMPS_structure(structure)
+ input_txt = generate_LAMMPS_input(potential_object,
+ parameters_data,
+ structure_file=self._INPUT_STRUCTURE,
+ optimize_path_file=self._OUTPUT_TRAJECTORY_FILE_NAME)"
+1884,https://:@github.com/abelcarreras/aiida_extensions.git,22dc45e2580529558e5e80e1f9fbd24e2540c201,"@@ -547,7 +547,7 @@ class WorkflowQHA(Workflow):
+ test_range[0] -= np.ceil(np.min([total_range/2, abs(test_range[0] - min_stress)]) / interval) * interval
+ # test_range[0] -= np.ceil(abs(test_range[0] - min_stress) / interval) * interval
+
+- if max_stress < test_range[1] or min_stress > test_range[0]:
++ if max_stress < test_range[1] and min_stress > test_range[0]:
+ if abs(max_stress - test_range[1]) < interval * 2 or abs(test_range[0] - min_stress) < interval * 2:
+ interval *= 0.5
+
+",workflows/wf_qha.py,"ReplaceText(target='and' @(550,42)->(550,44))","class WorkflowQHA(Workflow):
+ test_range[0] -= np.ceil(np.min([total_range/2, abs(test_range[0] - min_stress)]) / interval) * interval
+ # test_range[0] -= np.ceil(abs(test_range[0] - min_stress) / interval) * interval
+
+ if max_stress < test_range[1] or min_stress > test_range[0]:
+ if abs(max_stress - test_range[1]) < interval * 2 or abs(test_range[0] - min_stress) < interval * 2:
+ interval *= 0.5
+ ","class WorkflowQHA(Workflow):
+ test_range[0] -= np.ceil(np.min([total_range/2, abs(test_range[0] - min_stress)]) / interval) * interval
+ # test_range[0] -= np.ceil(abs(test_range[0] - min_stress) / interval) * interval
+
+ if max_stress < test_range[1] and min_stress > test_range[0]:
+ if abs(max_stress - test_range[1]) < interval * 2 or abs(test_range[0] - min_stress) < interval * 2:
+ interval *= 0.5
+ "
+1885,https://:@github.com/GeoStat-Framework/welltestpy.git,1f9ba2a6af846ae9ef0004c885d807a45a26a911,"@@ -833,7 +833,7 @@ class Well(object):
+ )
+ if not self._radius.scalar:
+ raise ValueError(""Well: 'radius' needs to be scalar"")
+- if self.radius <= 0.0:
++ if self.radius < 0.0:
+ raise ValueError(""Well: 'radius' needs to be positiv"")
+
+ if isinstance(coordinates, Variable):
+",welltestpy/data/varlib.py,"ReplaceText(target='<' @(836,23)->(836,25))","class Well(object):
+ )
+ if not self._radius.scalar:
+ raise ValueError(""Well: 'radius' needs to be scalar"")
+ if self.radius <= 0.0:
+ raise ValueError(""Well: 'radius' needs to be positiv"")
+
+ if isinstance(coordinates, Variable):","class Well(object):
+ )
+ if not self._radius.scalar:
+ raise ValueError(""Well: 'radius' needs to be scalar"")
+ if self.radius < 0.0:
+ raise ValueError(""Well: 'radius' needs to be positiv"")
+
+ if isinstance(coordinates, Variable):"
+1886,https://:@github.com/GeoStat-Framework/welltestpy.git,412f42ecf1bf2f9ae284aefd96802ee99cacdf2a,"@@ -544,7 +544,7 @@ def load_obs(obsfile):
+
+ obs = load_var(TxtIO(zfile.open(obsf)))
+
+- observation = varlib.Observation(name, time, obs, description)
++ observation = varlib.Observation(name, obs, time, description)
+ except Exception:
+ raise Exception(""loadObs: loading the observation was not possible"")
+ return observation
+",welltestpy/data/data_io.py,"ArgSwap(idxs=1<->2 @(547,22)->(547,40))","def load_obs(obsfile):
+
+ obs = load_var(TxtIO(zfile.open(obsf)))
+
+ observation = varlib.Observation(name, time, obs, description)
+ except Exception:
+ raise Exception(""loadObs: loading the observation was not possible"")
+ return observation","def load_obs(obsfile):
+
+ obs = load_var(TxtIO(zfile.open(obsf)))
+
+ observation = varlib.Observation(name, obs, time, description)
+ except Exception:
+ raise Exception(""loadObs: loading the observation was not possible"")
+ return observation"
+1887,https://:@github.com/GeoStat-Framework/welltestpy.git,412f42ecf1bf2f9ae284aefd96802ee99cacdf2a,"@@ -370,7 +370,7 @@ class PumpingTest(Test):
+ description : :class:`str`, optional
+ Description of the Variable. Default: ``""Drawdown observation""``
+ """"""
+- obs = varlib.DrawdownObs(well, time, observation, description)
++ obs = varlib.DrawdownObs(well, observation, time, description)
+ self.add_observations(obs)
+
+ def add_observations(self, obs):
+",welltestpy/data/testslib.py,"ArgSwap(idxs=1<->2 @(373,14)->(373,32))","class PumpingTest(Test):
+ description : :class:`str`, optional
+ Description of the Variable. Default: ``""Drawdown observation""``
+ """"""
+ obs = varlib.DrawdownObs(well, time, observation, description)
+ self.add_observations(obs)
+
+ def add_observations(self, obs):","class PumpingTest(Test):
+ description : :class:`str`, optional
+ Description of the Variable. Default: ``""Drawdown observation""``
+ """"""
+ obs = varlib.DrawdownObs(well, observation, time, description)
+ self.add_observations(obs)
+
+ def add_observations(self, obs):"
+1888,https://:@github.com/biosustain/venom.git,94aab380cb41a3923248adc51e3bbe312fe98cf0,"@@ -48,7 +48,7 @@ def _route_handler(venom: 'venom.rpc.Venom', method: Method, protocol_factory: T
+ http_request_query.decode(http_request.url.query, request)
+ http_request_path.decode(http_request.match_info, request)
+
+- response = await venom.invoke(method, request, context=AioHTTPRequestContext(request))
++ response = await venom.invoke(method, request, context=AioHTTPRequestContext(http_request))
+ return web.Response(body=rpc_response.pack(response),
+ content_type=rpc_response.mime,
+ status=http_status)
+",venom/rpc/comms/aiohttp.py,"ReplaceText(target='http_request' @(51,89)->(51,96))","def _route_handler(venom: 'venom.rpc.Venom', method: Method, protocol_factory: T
+ http_request_query.decode(http_request.url.query, request)
+ http_request_path.decode(http_request.match_info, request)
+
+ response = await venom.invoke(method, request, context=AioHTTPRequestContext(request))
+ return web.Response(body=rpc_response.pack(response),
+ content_type=rpc_response.mime,
+ status=http_status)","def _route_handler(venom: 'venom.rpc.Venom', method: Method, protocol_factory: T
+ http_request_query.decode(http_request.url.query, request)
+ http_request_path.decode(http_request.match_info, request)
+
+ response = await venom.invoke(method, request, context=AioHTTPRequestContext(http_request))
+ return web.Response(body=rpc_response.pack(response),
+ content_type=rpc_response.mime,
+ status=http_status)"
+1889,https://:@github.com/altio/foundation.git,e39b13a5046467ebed3014bb2b5b4a47c5cd0e80,"@@ -117,7 +117,7 @@ class Backend(six.with_metaclass(MediaDefiningClass, Router)):
+ # set app_index_class on app to ""None"" to skip creation
+ app_index_class = getattr(app_config, 'app_index_class', None)
+ if app_index_class:
+- template_name = getattr(app_config, 'template_name', 'app_index.html')
++ template_name = getattr(app_index_class, 'template_name', 'app_index.html')
+ app_index = app_index_class.as_view(
+ app_config=app_config, backend=self, template_name=template_name
+ )
+",foundation/backend/base.py,"ReplaceText(target='app_index_class' @(120,36)->(120,46))","class Backend(six.with_metaclass(MediaDefiningClass, Router)):
+ # set app_index_class on app to ""None"" to skip creation
+ app_index_class = getattr(app_config, 'app_index_class', None)
+ if app_index_class:
+ template_name = getattr(app_config, 'template_name', 'app_index.html')
+ app_index = app_index_class.as_view(
+ app_config=app_config, backend=self, template_name=template_name
+ )","class Backend(six.with_metaclass(MediaDefiningClass, Router)):
+ # set app_index_class on app to ""None"" to skip creation
+ app_index_class = getattr(app_config, 'app_index_class', None)
+ if app_index_class:
+ template_name = getattr(app_index_class, 'template_name', 'app_index.html')
+ app_index = app_index_class.as_view(
+ app_config=app_config, backend=self, template_name=template_name
+ )"
+1890,https://:@github.com/privacyidea/crontabparser.git,19e8fe34a9f9f1a2156c17d3b4b756f3aca17cdc,"@@ -30,7 +30,7 @@ class CronJob(object):
+ assert len(time) <= 5
+ padded_time = tuple(time) + ('*',) * (5 - len(time))
+ assert len(padded_time) == 5
+- return cls(command, time[0], user, padded_time[1], padded_time[2], padded_time[3], padded_time[4])
++ return cls(command, padded_time[0], user, padded_time[1], padded_time[2], padded_time[3], padded_time[4])
+
+ @property
+ def time(self):
+",cronjobparser.py,"ReplaceText(target='padded_time' @(33,28)->(33,32))","class CronJob(object):
+ assert len(time) <= 5
+ padded_time = tuple(time) + ('*',) * (5 - len(time))
+ assert len(padded_time) == 5
+ return cls(command, time[0], user, padded_time[1], padded_time[2], padded_time[3], padded_time[4])
+
+ @property
+ def time(self):","class CronJob(object):
+ assert len(time) <= 5
+ padded_time = tuple(time) + ('*',) * (5 - len(time))
+ assert len(padded_time) == 5
+ return cls(command, padded_time[0], user, padded_time[1], padded_time[2], padded_time[3], padded_time[4])
+
+ @property
+ def time(self):"
+1891,https://:@github.com/privacyidea/crontabparser.git,8a6a177a47b83938946ea7bf76741d96352eab08,"@@ -30,7 +30,7 @@ class CronJob(object):
+ if len(time) > 5:
+ raise RuntimeError(""Malformed cronjob time: {!r}"".format(time))
+ padded_time = tuple(time) + ('*',) * (5 - len(time))
+- if len(padded_time) > 5:
++ if len(padded_time) != 5:
+ raise RuntimeError(""Malformed cronjob time: {!r}"".format(padded_time))
+ return cls(command, padded_time[0], user, padded_time[1], padded_time[2], padded_time[3], padded_time[4])
+
+",cronjobparser.py,"ReplaceText(target='!=' @(33,28)->(33,29))","class CronJob(object):
+ if len(time) > 5:
+ raise RuntimeError(""Malformed cronjob time: {!r}"".format(time))
+ padded_time = tuple(time) + ('*',) * (5 - len(time))
+ if len(padded_time) > 5:
+ raise RuntimeError(""Malformed cronjob time: {!r}"".format(padded_time))
+ return cls(command, padded_time[0], user, padded_time[1], padded_time[2], padded_time[3], padded_time[4])
+ ","class CronJob(object):
+ if len(time) > 5:
+ raise RuntimeError(""Malformed cronjob time: {!r}"".format(time))
+ padded_time = tuple(time) + ('*',) * (5 - len(time))
+ if len(padded_time) != 5:
+ raise RuntimeError(""Malformed cronjob time: {!r}"".format(padded_time))
+ return cls(command, padded_time[0], user, padded_time[1], padded_time[2], padded_time[3], padded_time[4])
+ "
+1892,https://:@github.com/smurn/sourblossom.git,9071c9cc86f2755254ed3d36b7a08080c64ac19f,"@@ -116,7 +116,7 @@ class MsgConnection(protocol.Protocol):
+ def done(result):
+ self._sending = False
+ return result
+- d.addBoth(d)
++ d.addBoth(done)
+
+ def _frame_received(self, frameid, blob):
+ return self.frame_received(frameid, blob)
+",sourblossom/router.py,"ReplaceText(target='done' @(119,18)->(119,19))","class MsgConnection(protocol.Protocol):
+ def done(result):
+ self._sending = False
+ return result
+ d.addBoth(d)
+
+ def _frame_received(self, frameid, blob):
+ return self.frame_received(frameid, blob)","class MsgConnection(protocol.Protocol):
+ def done(result):
+ self._sending = False
+ return result
+ d.addBoth(done)
+
+ def _frame_received(self, frameid, blob):
+ return self.frame_received(frameid, blob)"
+1893,https://:@github.com/PMCC-BioinformaticsCore/pipelines.git,44406718107c18b4fe00e2a3abb4077dd158e298,"@@ -770,7 +770,7 @@ class Workflow(Tool):
+ wtools[s.id()] = wf_wdl
+ wtools.update(wf_tools)
+ else:
+- wtools[s.id()] = t.wdl(with_docker=with_docker)
++ wtools[t.id()] = t.wdl(with_docker=with_docker)
+
+ w.calls.append(
+ s.wdl(tool_aliases[t.id().lower()].upper() + ""."" + t.id(), s.id())
+",Pipeline/workflow/workflow.py,"ReplaceText(target='t' @(773,23)->(773,24))","class Workflow(Tool):
+ wtools[s.id()] = wf_wdl
+ wtools.update(wf_tools)
+ else:
+ wtools[s.id()] = t.wdl(with_docker=with_docker)
+
+ w.calls.append(
+ s.wdl(tool_aliases[t.id().lower()].upper() + ""."" + t.id(), s.id())","class Workflow(Tool):
+ wtools[s.id()] = wf_wdl
+ wtools.update(wf_tools)
+ else:
+ wtools[t.id()] = t.wdl(with_docker=with_docker)
+
+ w.calls.append(
+ s.wdl(tool_aliases[t.id().lower()].upper() + ""."" + t.id(), s.id())"
+1894,https://:@github.com/nvaytet/visens.git,320e6fed81a09d158e3728b7de54233657a24e0d,"@@ -13,7 +13,7 @@ def image(filename, colormap=""viridis"", vmin=None, vmax=None, log=False,
+
+ z, edges = np.histogram(data.ids,
+ bins=np.arange(-0.5, data.nx * data.ny + 0.5))
+- z = z.reshape(data.nx, data.ny)
++ z = z.reshape(data.ny, data.nx)
+ if side_panels:
+ z_sumx = np.sum(z, axis=1)
+ z_sumy = np.sum(z, axis=0)
+",src/visens/image.py,"ArgSwap(idxs=0<->1 @(16,8)->(16,17))","def image(filename, colormap=""viridis"", vmin=None, vmax=None, log=False,
+
+ z, edges = np.histogram(data.ids,
+ bins=np.arange(-0.5, data.nx * data.ny + 0.5))
+ z = z.reshape(data.nx, data.ny)
+ if side_panels:
+ z_sumx = np.sum(z, axis=1)
+ z_sumy = np.sum(z, axis=0)","def image(filename, colormap=""viridis"", vmin=None, vmax=None, log=False,
+
+ z, edges = np.histogram(data.ids,
+ bins=np.arange(-0.5, data.nx * data.ny + 0.5))
+ z = z.reshape(data.ny, data.nx)
+ if side_panels:
+ z_sumx = np.sum(z, axis=1)
+ z_sumy = np.sum(z, axis=0)"
+1895,https://:@github.com/nvaytet/visens.git,320e6fed81a09d158e3728b7de54233657a24e0d,"@@ -65,7 +65,7 @@ def slicer(filename, colormap=""viridis"", vmin=None, vmax=None, log=False,
+ z, xe, ye = np.histogram2d(data.ids, data.tofs/1.0e3,
+ bins=[np.arange(-0.5, data.nx * data.ny + 0.5),
+ t])
+- z = z.reshape(data.nx, data.ny, nbins)
++ z = z.reshape(data.ny, data.nx, nbins)
+ # Transpose should be True for old December 2018 files
+ if transpose:
+ z = np.transpose(z, axes=[1, 0, 2])
+",src/visens/slicer.py,"ArgSwap(idxs=0<->1 @(68,8)->(68,17))","def slicer(filename, colormap=""viridis"", vmin=None, vmax=None, log=False,
+ z, xe, ye = np.histogram2d(data.ids, data.tofs/1.0e3,
+ bins=[np.arange(-0.5, data.nx * data.ny + 0.5),
+ t])
+ z = z.reshape(data.nx, data.ny, nbins)
+ # Transpose should be True for old December 2018 files
+ if transpose:
+ z = np.transpose(z, axes=[1, 0, 2])","def slicer(filename, colormap=""viridis"", vmin=None, vmax=None, log=False,
+ z, xe, ye = np.histogram2d(data.ids, data.tofs/1.0e3,
+ bins=[np.arange(-0.5, data.nx * data.ny + 0.5),
+ t])
+ z = z.reshape(data.ny, data.nx, nbins)
+ # Transpose should be True for old December 2018 files
+ if transpose:
+ z = np.transpose(z, axes=[1, 0, 2])"
+1896,https://:@github.com/compmech/structmanager.git,3082bac86d0c1ad2826111bde8c2e5d5976dd7c8,"@@ -200,7 +200,7 @@ class Model(object):
+
+ print('Building stringers...')
+ for s in stringers.values():
+- s.elements = [bdf.elements[eid] for eid in p.eids]
++ s.elements = [bdf.elements[eid] for eid in s.eids]
+ setelements = set(s.elements)
+ print('finished!')
+
+",structMan/model.py,"ReplaceText(target='s' @(203,55)->(203,56))","class Model(object):
+
+ print('Building stringers...')
+ for s in stringers.values():
+ s.elements = [bdf.elements[eid] for eid in p.eids]
+ setelements = set(s.elements)
+ print('finished!')
+ ","class Model(object):
+
+ print('Building stringers...')
+ for s in stringers.values():
+ s.elements = [bdf.elements[eid] for eid in s.eids]
+ setelements = set(s.elements)
+ print('finished!')
+ "
+1897,https://:@github.com/al-fontes-jr/bardolph.git,c4429c7a1453ff8088bffa4066b8fe9ff7d4c164,"@@ -61,7 +61,7 @@ def as_raw(reg, logical_value, use_float=False):
+ else:
+ value = (logical_value % 360.0) / 360.0 * 65535.0
+ elif reg in (Register.BRIGHTNESS, Register.SATURATION):
+- if logical_value == 100.0:
++ if logical_value >= 100.0:
+ value = 65535.0
+ else:
+ value = logical_value / 100.0 * 65535.0
+",bardolph/controller/units.py,"ReplaceText(target='>=' @(64,25)->(64,27))","def as_raw(reg, logical_value, use_float=False):
+ else:
+ value = (logical_value % 360.0) / 360.0 * 65535.0
+ elif reg in (Register.BRIGHTNESS, Register.SATURATION):
+ if logical_value == 100.0:
+ value = 65535.0
+ else:
+ value = logical_value / 100.0 * 65535.0","def as_raw(reg, logical_value, use_float=False):
+ else:
+ value = (logical_value % 360.0) / 360.0 * 65535.0
+ elif reg in (Register.BRIGHTNESS, Register.SATURATION):
+ if logical_value >= 100.0:
+ value = 65535.0
+ else:
+ value = logical_value / 100.0 * 65535.0"
+1898,https://:@github.com/bluecoveltd/contracts.git,f5b74e088920520642500d4da990580c841cbb22,"@@ -25,7 +25,7 @@ class SeparateContext(Contract):
+ return SeparateContext(tokens[0]['child'], where=where)
+
+
+-sepcon = (Group(Literal('$') - Literal('(') -
++sepcon = (Group(Literal('$') + Literal('(') -
+ contract_expression('child') - Literal(')')))
+ sepcon.setParseAction(SeparateContext.parse_action)
+ sepcon.setName('Context separation construct')
+",src/contracts/library/separate_context.py,"ReplaceText(target='+' @(28,29)->(28,30))","class SeparateContext(Contract):
+ return SeparateContext(tokens[0]['child'], where=where)
+
+
+ sepcon = (Group(Literal('$') - Literal('(') -
+ contract_expression('child') - Literal(')')))
+ sepcon.setParseAction(SeparateContext.parse_action)
+ sepcon.setName('Context separation construct')","class SeparateContext(Contract):
+ return SeparateContext(tokens[0]['child'], where=where)
+
+
+ sepcon = (Group(Literal('$') + Literal('(') -
+ contract_expression('child') - Literal(')')))
+ sepcon.setParseAction(SeparateContext.parse_action)
+ sepcon.setName('Context separation construct')"
+1899,https://:@github.com/TimHessels/WaporTranslator.git,58f1b770f5b60b2468677294c51c52460305b12f,"@@ -111,7 +111,7 @@ class Rasterdata_tiffs:
+ time_or = ''
+
+ # Apply gapfilling if needed
+- if gap_filling != None and ~np.isnan(np.nanmean(Array)):
++ if gap_filling != None and ~np.isnan(np.nanmean(Array_end)):
+ Array_end[np.isnan(Array_end)] = -9999
+ Array_end = RC.gap_filling(Array_end, -9999, gap_filling)
+ Array_end = Array_end * MASK
+",LEVEL_1/DataCube.py,"ReplaceText(target='Array_end' @(114,60)->(114,65))","class Rasterdata_tiffs:
+ time_or = ''
+
+ # Apply gapfilling if needed
+ if gap_filling != None and ~np.isnan(np.nanmean(Array)):
+ Array_end[np.isnan(Array_end)] = -9999
+ Array_end = RC.gap_filling(Array_end, -9999, gap_filling)
+ Array_end = Array_end * MASK","class Rasterdata_tiffs:
+ time_or = ''
+
+ # Apply gapfilling if needed
+ if gap_filling != None and ~np.isnan(np.nanmean(Array_end)):
+ Array_end[np.isnan(Array_end)] = -9999
+ Array_end = RC.gap_filling(Array_end, -9999, gap_filling)
+ Array_end = Array_end * MASK"
+1900,https://:@github.com/TimHessels/WaporTranslator.git,fab158818a8bcc5a90b04347469916bdb2cd8fa9,"@@ -311,7 +311,7 @@ def main(Start_year_analyses, End_year_analyses, output_folder):
+ if not np.isnan(np.nanmean(Crop_S1_End.Data)):
+ for Date_Year in Dates_Years:
+ year_diff = int(Date_Year.year - Dates_Years[0].year)
+- for dekad in range(0,int(np.nanmax(Crop_S2_End.Data))):
++ for dekad in range(0,int(np.nanmax(Crop_S3_End.Data))):
+ Accumulated_NPP_Data_Start_S1[year_diff, Crop_S1_End.Data[year_diff, :, :] == dekad] = NPPcum.Data[np.minimum(NPPcum.Size[0]-1, int(year_diff * 36 + dekad-1)), Crop_S1_End.Data[year_diff, :, :] == dekad]
+ Accumulated_NPP_Data_Start_S2[year_diff, Crop_S2_End.Data[year_diff, :, :] == dekad] = NPPcum.Data[np.minimum(NPPcum.Size[0]-1, int(year_diff * 36 + dekad-1)), Crop_S2_End.Data[year_diff, :, :] == dekad]
+ Accumulated_NPP_Data_Start_S3[year_diff, Crop_S3_End.Data[year_diff, :, :] == dekad] = NPPcum.Data[np.minimum(NPPcum.Size[0]-1, int(year_diff * 36 + dekad-1)), Crop_S3_End.Data[year_diff, :, :] == dekad]
+",LEVEL_3/Food_Security/LEVEL_3_Calc_Food_Security.py,"ReplaceText(target='Crop_S3_End' @(314,47)->(314,58))","def main(Start_year_analyses, End_year_analyses, output_folder):
+ if not np.isnan(np.nanmean(Crop_S1_End.Data)):
+ for Date_Year in Dates_Years:
+ year_diff = int(Date_Year.year - Dates_Years[0].year)
+ for dekad in range(0,int(np.nanmax(Crop_S2_End.Data))):
+ Accumulated_NPP_Data_Start_S1[year_diff, Crop_S1_End.Data[year_diff, :, :] == dekad] = NPPcum.Data[np.minimum(NPPcum.Size[0]-1, int(year_diff * 36 + dekad-1)), Crop_S1_End.Data[year_diff, :, :] == dekad]
+ Accumulated_NPP_Data_Start_S2[year_diff, Crop_S2_End.Data[year_diff, :, :] == dekad] = NPPcum.Data[np.minimum(NPPcum.Size[0]-1, int(year_diff * 36 + dekad-1)), Crop_S2_End.Data[year_diff, :, :] == dekad]
+ Accumulated_NPP_Data_Start_S3[year_diff, Crop_S3_End.Data[year_diff, :, :] == dekad] = NPPcum.Data[np.minimum(NPPcum.Size[0]-1, int(year_diff * 36 + dekad-1)), Crop_S3_End.Data[year_diff, :, :] == dekad] ","def main(Start_year_analyses, End_year_analyses, output_folder):
+ if not np.isnan(np.nanmean(Crop_S1_End.Data)):
+ for Date_Year in Dates_Years:
+ year_diff = int(Date_Year.year - Dates_Years[0].year)
+ for dekad in range(0,int(np.nanmax(Crop_S3_End.Data))):
+ Accumulated_NPP_Data_Start_S1[year_diff, Crop_S1_End.Data[year_diff, :, :] == dekad] = NPPcum.Data[np.minimum(NPPcum.Size[0]-1, int(year_diff * 36 + dekad-1)), Crop_S1_End.Data[year_diff, :, :] == dekad]
+ Accumulated_NPP_Data_Start_S2[year_diff, Crop_S2_End.Data[year_diff, :, :] == dekad] = NPPcum.Data[np.minimum(NPPcum.Size[0]-1, int(year_diff * 36 + dekad-1)), Crop_S2_End.Data[year_diff, :, :] == dekad]
+ Accumulated_NPP_Data_Start_S3[year_diff, Crop_S3_End.Data[year_diff, :, :] == dekad] = NPPcum.Data[np.minimum(NPPcum.Size[0]-1, int(year_diff * 36 + dekad-1)), Crop_S3_End.Data[year_diff, :, :] == dekad] "
+1901,https://:@github.com/padraic-padraic/StabilizerSearch.git,9a7b666656f60cbeb5a271e8e6c4ceb168f754fd,"@@ -121,7 +121,7 @@ def get_positive_stabilizer_groups(n_qubits, n_states):
+ continue
+ subspaces.append(res)
+ generators.append(tuple(candidate.generators))
+- if len(generators) == n_states:
++ if len(generators) == target:
+ break
+ return generators
+
+",stabilizer_search/stabilizers/py_generators.py,"ReplaceText(target='target' @(124,30)->(124,38))","def get_positive_stabilizer_groups(n_qubits, n_states):
+ continue
+ subspaces.append(res)
+ generators.append(tuple(candidate.generators))
+ if len(generators) == n_states:
+ break
+ return generators
+ ","def get_positive_stabilizer_groups(n_qubits, n_states):
+ continue
+ subspaces.append(res)
+ generators.append(tuple(candidate.generators))
+ if len(generators) == target:
+ break
+ return generators
+ "
+1902,https://:@github.com/jwg4/volly.git,fabca57aac55f7350f24c006d2035360e94d29fc,"@@ -16,4 +16,4 @@ class TestService(TestCase):
+
+ def test_write_missing_value(self):
+ svc = Service(""https://volatile.wtf"")
+- self.assertRaises(lambda: svc[""UNGYIZFHIA""], MissingKeyException)
++ self.assertRaises(MissingKeyException, lambda: svc[""UNGYIZFHIA""])
+",tests/__init__.py,"ArgSwap(idxs=0<->1 @(19,8)->(19,25))","class TestService(TestCase):
+
+ def test_write_missing_value(self):
+ svc = Service(""https://volatile.wtf"")
+ self.assertRaises(lambda: svc[""UNGYIZFHIA""], MissingKeyException)","class TestService(TestCase):
+
+ def test_write_missing_value(self):
+ svc = Service(""https://volatile.wtf"")
+ self.assertRaises(MissingKeyException, lambda: svc[""UNGYIZFHIA""])"
+1903,https://:@github.com/ismaelpessa/Muse_Cube.git,e01ea96ba7095c502c18faf927f43b8528eb76a2,"@@ -934,7 +934,7 @@ class MuseCube:
+ print('Fit Aceptado')
+ print(str(x[i]) + ',' + str(y[i]))
+ units = u.km / u.s
+- vel = ltu.dv_from_z((mean / wv_line_vac) - 1, z_line).to(units).value
++ vel = ltu.dv_from_z((mean / wv_line_vac) - 1, z).to(units).value
+ kine_im[y[i]][x[i]] = vel
+ else:
+ if debug:
+",PyMUSE/musecube.py,"ReplaceText(target='z' @(937,62)->(937,68))","class MuseCube:
+ print('Fit Aceptado')
+ print(str(x[i]) + ',' + str(y[i]))
+ units = u.km / u.s
+ vel = ltu.dv_from_z((mean / wv_line_vac) - 1, z_line).to(units).value
+ kine_im[y[i]][x[i]] = vel
+ else:
+ if debug:","class MuseCube:
+ print('Fit Aceptado')
+ print(str(x[i]) + ',' + str(y[i]))
+ units = u.km / u.s
+ vel = ltu.dv_from_z((mean / wv_line_vac) - 1, z).to(units).value
+ kine_im[y[i]][x[i]] = vel
+ else:
+ if debug:"
+1904,https://:@github.com/chie8842/mldatautils.git,ccc35e5d07c30e7ec685bfe305ad5e2623015147,"@@ -20,7 +20,7 @@ def _config_parse(config_file):
+ 'port': os.getenv('DB_PORT'),
+ 'database': os.getenv('DATABASE'),
+ }
+- return config_file
++ return dwh_config
+
+ def create_engine(config_file=None):
+ dwh_config = _config_parse(config_file)
+",mldatautils/db_utils.py,"ReplaceText(target='dwh_config' @(23,11)->(23,22))","def _config_parse(config_file):
+ 'port': os.getenv('DB_PORT'),
+ 'database': os.getenv('DATABASE'),
+ }
+ return config_file
+
+ def create_engine(config_file=None):
+ dwh_config = _config_parse(config_file)","def _config_parse(config_file):
+ 'port': os.getenv('DB_PORT'),
+ 'database': os.getenv('DATABASE'),
+ }
+ return dwh_config
+
+ def create_engine(config_file=None):
+ dwh_config = _config_parse(config_file)"
+1905,https://:@github.com/andrewbihl/bted.git,d04bda7b1d287b1b1f06983c306455f5fee0f152,"@@ -24,7 +24,7 @@ class TestAppend(unittest.TestCase):
+ expected = fin.read()
+ cmd, flags = self.interpreter.build_command(command, input_file)
+ res = self.interpreter.execute_command(cmd, flags, return_output=True)
+- self.assertEqual(res, expected)
++ self.assertEqual(expected, res)
+
+ def perform_test_from_key(self, key: str):
+ tests = self.tests[key]
+",bted/tests/test_append.py,"ArgSwap(idxs=0<->1 @(27,8)->(27,24))","class TestAppend(unittest.TestCase):
+ expected = fin.read()
+ cmd, flags = self.interpreter.build_command(command, input_file)
+ res = self.interpreter.execute_command(cmd, flags, return_output=True)
+ self.assertEqual(res, expected)
+
+ def perform_test_from_key(self, key: str):
+ tests = self.tests[key]","class TestAppend(unittest.TestCase):
+ expected = fin.read()
+ cmd, flags = self.interpreter.build_command(command, input_file)
+ res = self.interpreter.execute_command(cmd, flags, return_output=True)
+ self.assertEqual(expected, res)
+
+ def perform_test_from_key(self, key: str):
+ tests = self.tests[key]"
+1906,https://:@github.com/muammar/mlchem.git,dbb7de0379cb8881538d211899e4bec8794f16e3,"@@ -344,7 +344,7 @@ def train(inputs, targets, model=None, data=None, optimizer=None, lr=None,
+ logger.info('Training finished in {} hours {} minutes {:.2f} seconds.'
+ .format(h, m, s))
+ logger.info('outputs')
+- logger.info(outputs)
++ logger.info(outputs_)
+ logger.info('targets')
+ logger.info(targets)
+
+",mlchem/models/neuralnetwork.py,"ReplaceText(target='outputs_' @(347,16)->(347,23))","def train(inputs, targets, model=None, data=None, optimizer=None, lr=None,
+ logger.info('Training finished in {} hours {} minutes {:.2f} seconds.'
+ .format(h, m, s))
+ logger.info('outputs')
+ logger.info(outputs)
+ logger.info('targets')
+ logger.info(targets)
+ ","def train(inputs, targets, model=None, data=None, optimizer=None, lr=None,
+ logger.info('Training finished in {} hours {} minutes {:.2f} seconds.'
+ .format(h, m, s))
+ logger.info('outputs')
+ logger.info(outputs_)
+ logger.info('targets')
+ logger.info(targets)
+ "
+1907,https://:@github.com/ibrokemypie/m3uspiff.git,e44882b66620c92ba437313d4b305c835506a5d5,"@@ -39,7 +39,7 @@ def mdata(path, track_element):
+ for tag in tags:
+ tagstring = tag+"":""
+ if tagstring in linecheck:
+- stringf = out.split(': ')[1]
++ stringf = decoded.split(': ')[1]
+ ttag = tag
+ if tag == ""artist"":
+ ttag = ""creator""
+",m3uspiff.py,"ReplaceText(target='decoded' @(42,30)->(42,33))","def mdata(path, track_element):
+ for tag in tags:
+ tagstring = tag+"":""
+ if tagstring in linecheck:
+ stringf = out.split(': ')[1]
+ ttag = tag
+ if tag == ""artist"":
+ ttag = ""creator""","def mdata(path, track_element):
+ for tag in tags:
+ tagstring = tag+"":""
+ if tagstring in linecheck:
+ stringf = decoded.split(': ')[1]
+ ttag = tag
+ if tag == ""artist"":
+ ttag = ""creator"""
+1908,https://:@github.com/ibrokemypie/m3uspiff.git,aca86931f7453d9c90c2ef779ede1659d10af00d,"@@ -45,7 +45,7 @@ def mdata(path, track_element):
+ ttag = ""creator""
+ if tag == ""genre"":
+ ttag = ""info""
+- ttag = SubElement(track_element, tag)
++ ttag = SubElement(track_element, ttag)
+ ttag.text = stringf.rstrip()
+ else:
+ break
+",m3uspiff.py,"ReplaceText(target='ttag' @(48,53)->(48,56))","def mdata(path, track_element):
+ ttag = ""creator""
+ if tag == ""genre"":
+ ttag = ""info""
+ ttag = SubElement(track_element, tag)
+ ttag.text = stringf.rstrip()
+ else:
+ break","def mdata(path, track_element):
+ ttag = ""creator""
+ if tag == ""genre"":
+ ttag = ""info""
+ ttag = SubElement(track_element, ttag)
+ ttag.text = stringf.rstrip()
+ else:
+ break"
+1909,https://:@github.com/LanguageMachines/CLIN28_ST_spelling_correction.git,b95343c354ae7ee1934b9bba9a9ded0a89bd3048,"@@ -8,7 +8,7 @@ class ValidationError(Exception):
+
+ class CLIN28JSON:
+ def __init__(self, filename):
+- if os.path.exists(filename):
++ if not os.path.exists(filename):
+ raise FileExistsError(""File not found: "" + filename)
+
+ with open(filename,'r', encoding='utf-8') as f:
+",clin28tools/format.py,"ReplaceText(target='not ' @(11,11)->(11,11))","class ValidationError(Exception):
+
+ class CLIN28JSON:
+ def __init__(self, filename):
+ if os.path.exists(filename):
+ raise FileExistsError(""File not found: "" + filename)
+
+ with open(filename,'r', encoding='utf-8') as f:","class ValidationError(Exception):
+
+ class CLIN28JSON:
+ def __init__(self, filename):
+ if not os.path.exists(filename):
+ raise FileExistsError(""File not found: "" + filename)
+
+ with open(filename,'r', encoding='utf-8') as f:"
+1910,https://:@github.com/LanguageMachines/CLIN28_ST_spelling_correction.git,f6d60c45406614fc6fbf930d3a44cc5e7b1453fb,"@@ -57,7 +57,7 @@ class CLIN28JSON:
+ correction['confidence'] = float(correction['confidence'])
+ except:
+ raise ValidationError(""Invalid confidence value ("" + str(correction['confidence']) + "") "" + repr(correction))
+- if correction['confidence'] < 0 or correction['confidence'] > 0:
++ if correction['confidence'] < 0 or correction['confidence'] > 1:
+ raise ValidationError(""Confidence value out of bounds ("" + str(correction['confidence']) + "") "" + repr(correction))
+
+ def words(self):
+",clin28tools/format.py,"ReplaceText(target='1' @(60,82)->(60,83))","class CLIN28JSON:
+ correction['confidence'] = float(correction['confidence'])
+ except:
+ raise ValidationError(""Invalid confidence value ("" + str(correction['confidence']) + "") "" + repr(correction))
+ if correction['confidence'] < 0 or correction['confidence'] > 0:
+ raise ValidationError(""Confidence value out of bounds ("" + str(correction['confidence']) + "") "" + repr(correction))
+
+ def words(self):","class CLIN28JSON:
+ correction['confidence'] = float(correction['confidence'])
+ except:
+ raise ValidationError(""Invalid confidence value ("" + str(correction['confidence']) + "") "" + repr(correction))
+ if correction['confidence'] < 0 or correction['confidence'] > 1:
+ raise ValidationError(""Confidence value out of bounds ("" + str(correction['confidence']) + "") "" + repr(correction))
+
+ def words(self):"
+1911,https://:@github.com/drmartiner/django-smsaero.git,067445a9613fcdb635f49750ac2d49b3eac5a38a,"@@ -24,7 +24,7 @@ class SmsSenderTest(TestCase):
+ @patch('urllib2.urlopen', _fake_urlopen)
+ def test_send_request(self):
+ sender = SmsSender()
+- response = sender.send_request('/link/', {})
++ response = sender.send_request({}, '/link/')
+ self.assertIn(SMSMessage.STATUS_ACCEPTED, response)
+
+ @patch('smsaero.conf.SMSAERO_PASSWORD', 'FAKE')
+",smsaero/tests.py,"ArgSwap(idxs=0<->1 @(27,19)->(27,38))","class SmsSenderTest(TestCase):
+ @patch('urllib2.urlopen', _fake_urlopen)
+ def test_send_request(self):
+ sender = SmsSender()
+ response = sender.send_request('/link/', {})
+ self.assertIn(SMSMessage.STATUS_ACCEPTED, response)
+
+ @patch('smsaero.conf.SMSAERO_PASSWORD', 'FAKE')","class SmsSenderTest(TestCase):
+ @patch('urllib2.urlopen', _fake_urlopen)
+ def test_send_request(self):
+ sender = SmsSender()
+ response = sender.send_request({}, '/link/')
+ self.assertIn(SMSMessage.STATUS_ACCEPTED, response)
+
+ @patch('smsaero.conf.SMSAERO_PASSWORD', 'FAKE')"
+1912,https://:@github.com/drmartiner/django-smsaero.git,916bcb1b7a9b1546a0944752f909e5a752cb99a6,"@@ -68,7 +68,7 @@ def send_sms(to, text, signature_id=None, date=None, link='/send/'):
+ 'from': signature.name,
+ 'date': date or '',
+ }
+- response = sender.send_request(link, params)
++ response = sender.send_request(params, link)
+ sms_id, status = sender.parse_response(response)
+
+ if not sms_id or not status:
+",smsaero/utils.py,"ArgSwap(idxs=0<->1 @(71,15)->(71,34))","def send_sms(to, text, signature_id=None, date=None, link='/send/'):
+ 'from': signature.name,
+ 'date': date or '',
+ }
+ response = sender.send_request(link, params)
+ sms_id, status = sender.parse_response(response)
+
+ if not sms_id or not status:","def send_sms(to, text, signature_id=None, date=None, link='/send/'):
+ 'from': signature.name,
+ 'date': date or '',
+ }
+ response = sender.send_request(params, link)
+ sms_id, status = sender.parse_response(response)
+
+ if not sms_id or not status:"
+1913,https://:@github.com/jakirkham/kenjutsu.git,c532fe8f06fd9facc284639e0a87f88e44de852a,"@@ -103,7 +103,7 @@ def reformat_slice(a_slice, a_length=None):
+ start = a_length - 1
+ if stop_i and stop < -a_length:
+ stop = None
+- stop_i = True
++ stop_i = False
+
+ # Catch some known empty slices.
+ if (step > 0) and (stop == 0):
+",kenjutsu/kenjutsu.py,"ReplaceText(target='False' @(106,29)->(106,33))","def reformat_slice(a_slice, a_length=None):
+ start = a_length - 1
+ if stop_i and stop < -a_length:
+ stop = None
+ stop_i = True
+
+ # Catch some known empty slices.
+ if (step > 0) and (stop == 0):","def reformat_slice(a_slice, a_length=None):
+ start = a_length - 1
+ if stop_i and stop < -a_length:
+ stop = None
+ stop_i = False
+
+ # Catch some known empty slices.
+ if (step > 0) and (stop == 0):"
+1914,https://:@github.com/jakirkham/kenjutsu.git,a3b1486a8711d57b93f43a35bb7dea2ab70a83ff,"@@ -55,7 +55,7 @@ def reformat_slice(a_slice, a_length=None):
+ new_slice = a_slice
+ if new_slice is Ellipsis:
+ new_slice = slice(None)
+- elif not isinstance(new_slice, slice):
++ elif not isinstance(a_slice, slice):
+ raise ValueError(
+ ""Expected a `slice` type. Instead got `%s`."" % str(new_slice)
+ )
+",kenjutsu/kenjutsu.py,"ReplaceText(target='a_slice' @(58,24)->(58,33))","def reformat_slice(a_slice, a_length=None):
+ new_slice = a_slice
+ if new_slice is Ellipsis:
+ new_slice = slice(None)
+ elif not isinstance(new_slice, slice):
+ raise ValueError(
+ ""Expected a `slice` type. Instead got `%s`."" % str(new_slice)
+ )","def reformat_slice(a_slice, a_length=None):
+ new_slice = a_slice
+ if new_slice is Ellipsis:
+ new_slice = slice(None)
+ elif not isinstance(a_slice, slice):
+ raise ValueError(
+ ""Expected a `slice` type. Instead got `%s`."" % str(new_slice)
+ )"
+1915,https://:@github.com/jakirkham/kenjutsu.git,dbedbd6ff58c9aadf79edc7cc840d6ec15552674,"@@ -57,7 +57,7 @@ def reformat_slice(a_slice, a_length=None):
+ new_slice = slice(None)
+ elif not isinstance(a_slice, slice):
+ raise ValueError(
+- ""Expected a `slice` type. Instead got `%s`."" % str(new_slice)
++ ""Expected a `slice` type. Instead got `%s`."" % str(a_slice)
+ )
+
+ if new_slice.step == 0:
+",kenjutsu/kenjutsu.py,"ReplaceText(target='a_slice' @(60,63)->(60,72))","def reformat_slice(a_slice, a_length=None):
+ new_slice = slice(None)
+ elif not isinstance(a_slice, slice):
+ raise ValueError(
+ ""Expected a `slice` type. Instead got `%s`."" % str(new_slice)
+ )
+
+ if new_slice.step == 0:","def reformat_slice(a_slice, a_length=None):
+ new_slice = slice(None)
+ elif not isinstance(a_slice, slice):
+ raise ValueError(
+ ""Expected a `slice` type. Instead got `%s`."" % str(a_slice)
+ )
+
+ if new_slice.step == 0:"
+1916,https://:@github.com/bh/python-keepass-httpd.git,548473a3d4044f89e3a30639fa2aafb71bb321b6,"@@ -86,7 +86,7 @@ def main():
+ if success is False:
+ sys.exit(""Wrong passphrase after %d attempts"" % max_try_count)
+
+- server.set_backend(backend)
++ kpconf.set_backend(backend)
+
+ # config daemon
+ if is_daemon:
+",src/keepass_http/scripts/python_keepass_httpd.py,"ReplaceText(target='kpconf' @(89,4)->(89,10))","def main():
+ if success is False:
+ sys.exit(""Wrong passphrase after %d attempts"" % max_try_count)
+
+ server.set_backend(backend)
+
+ # config daemon
+ if is_daemon:","def main():
+ if success is False:
+ sys.exit(""Wrong passphrase after %d attempts"" % max_try_count)
+
+ kpconf.set_backend(backend)
+
+ # config daemon
+ if is_daemon:"
+1917,https://:@github.com/frkhit/pyxtools.git,678039c852edb8b94a45aa39393043019a52bdc7,"@@ -20,7 +20,7 @@ class IndexType(Enum):
+ def to_train(self) -> bool:
+ if self.name == ""compress"":
+ return True
+- return True
++ return False
+
+ @property
+ def index_factory(self) -> str:
+",pyxtools/faiss_tools/faiss_utils.py,"ReplaceText(target='False' @(23,15)->(23,19))","class IndexType(Enum):
+ def to_train(self) -> bool:
+ if self.name == ""compress"":
+ return True
+ return True
+
+ @property
+ def index_factory(self) -> str:","class IndexType(Enum):
+ def to_train(self) -> bool:
+ if self.name == ""compress"":
+ return True
+ return False
+
+ @property
+ def index_factory(self) -> str:"
+1918,https://:@github.com/combatopera/Concern.git,32c056654b62e455261ac6381c7207c6c1e4be39,"@@ -69,7 +69,7 @@ def main_Concern():
+ (-Concern).printf('vimArgs := $list()')
+ for arg in vimargs:
+ (-Concern).printf(""vimArgs += %s"", arg)
+- import_module(f"".consumer.{Concern.consumerName}"", package = __package__).configure(config)
++ import_module(f"".consumer.{Concern.consumerName}"", package = __package__).configure(Concern)
+ (-Concern).processtemplate(resource_filename(templates.__name__, 'vimrc.aridt'), concernvimrc)
+ (-Concern).printf('"" = $(pystr)')
+ (-Concern).processtemplate(resource_filename(templates.__name__, 'sendblock.py.aridt'), sendblock)
+",concern/concern.py,"ReplaceText(target='Concern' @(72,92)->(72,98))","def main_Concern():
+ (-Concern).printf('vimArgs := $list()')
+ for arg in vimargs:
+ (-Concern).printf(""vimArgs += %s"", arg)
+ import_module(f"".consumer.{Concern.consumerName}"", package = __package__).configure(config)
+ (-Concern).processtemplate(resource_filename(templates.__name__, 'vimrc.aridt'), concernvimrc)
+ (-Concern).printf('"" = $(pystr)')
+ (-Concern).processtemplate(resource_filename(templates.__name__, 'sendblock.py.aridt'), sendblock)","def main_Concern():
+ (-Concern).printf('vimArgs := $list()')
+ for arg in vimargs:
+ (-Concern).printf(""vimArgs += %s"", arg)
+ import_module(f"".consumer.{Concern.consumerName}"", package = __package__).configure(Concern)
+ (-Concern).processtemplate(resource_filename(templates.__name__, 'vimrc.aridt'), concernvimrc)
+ (-Concern).printf('"" = $(pystr)')
+ (-Concern).processtemplate(resource_filename(templates.__name__, 'sendblock.py.aridt'), sendblock)"
+1919,https://:@github.com/brianhie/ample.git,8fc0e7a08beb33770dcad583debf60b1bd06cc51,"@@ -66,7 +66,7 @@ def kmeanspp(X, n_clusters, seed=None, replace=False,
+ centers[c] = X[best_candidate].toarray()
+ else:
+ centers[c] = X[best_candidate]
+- centers_idx.append(c)
++ centers_idx.append(best_candidate)
+ current_pot = best_pot
+ closest_dist_sq = best_dist_sq
+
+",geosketch/kmeanspp.py,"ReplaceText(target='best_candidate' @(69,27)->(69,28))","def kmeanspp(X, n_clusters, seed=None, replace=False,
+ centers[c] = X[best_candidate].toarray()
+ else:
+ centers[c] = X[best_candidate]
+ centers_idx.append(c)
+ current_pot = best_pot
+ closest_dist_sq = best_dist_sq
+ ","def kmeanspp(X, n_clusters, seed=None, replace=False,
+ centers[c] = X[best_candidate].toarray()
+ else:
+ centers[c] = X[best_candidate]
+ centers_idx.append(best_candidate)
+ current_pot = best_pot
+ closest_dist_sq = best_dist_sq
+ "
+1920,https://:@github.com/AWehrhahn/PyReduce.git,3971160a9dc6f308d452b99fadc27da10a8eb36a,"@@ -35,7 +35,7 @@ def UVES_HD132205(local_dir=""./""):
+ with tarfile.open(filename) as file:
+ file.extractall(path=target_dir)
+
+- return local_dir
++ return target_dir
+
+
+ if __name__ == ""__main__"":
+",pyreduce/datasets.py,"ReplaceText(target='target_dir' @(38,11)->(38,20))","def UVES_HD132205(local_dir=""./""):
+ with tarfile.open(filename) as file:
+ file.extractall(path=target_dir)
+
+ return local_dir
+
+
+ if __name__ == ""__main__"":","def UVES_HD132205(local_dir=""./""):
+ with tarfile.open(filename) as file:
+ file.extractall(path=target_dir)
+
+ return target_dir
+
+
+ if __name__ == ""__main__"":"
+1921,https://:@github.com/4degrees/segue.git,06d1a4945dcf6c99630412967d6c20ba400f8bb7,"@@ -120,7 +120,7 @@ class SelectorWidget(QtGui.QFrame):
+ '''
+ matches = self.list_widget.findItems(
+ item,
+- QtCore.Qt.MatchFixedString | QtCore.Qt.CaseSensitive
++ QtCore.Qt.MatchFixedString & QtCore.Qt.CaseSensitive
+ )
+
+ if matches:
+",source/segue/frontend/selector.py,"ReplaceText(target='&' @(123,39)->(123,40))","class SelectorWidget(QtGui.QFrame):
+ '''
+ matches = self.list_widget.findItems(
+ item,
+ QtCore.Qt.MatchFixedString | QtCore.Qt.CaseSensitive
+ )
+
+ if matches:","class SelectorWidget(QtGui.QFrame):
+ '''
+ matches = self.list_widget.findItems(
+ item,
+ QtCore.Qt.MatchFixedString & QtCore.Qt.CaseSensitive
+ )
+
+ if matches:"
+1922,https://:@github.com/gmrukwa/divik.git,7a46f680e9c5832ef3b81ab6a73bc6a1f25efa21,"@@ -143,6 +143,6 @@ class SpearmanDistance(DistanceMetric):
+ if first is not self._last:
+ self._last = first
+ self._last_ranks = np.apply_along_axis(st.rankdata, 0, first)
+- second_ranks = np.apply_along_axis(st.rankdata, 0, first)
++ second_ranks = np.apply_along_axis(st.rankdata, 0, second)
+ return dist.cdist(self._last_ranks, second_ranks, metric='correlation')
+
+",spdivik/distance.py,"ReplaceText(target='second' @(146,59)->(146,64))","class SpearmanDistance(DistanceMetric):
+ if first is not self._last:
+ self._last = first
+ self._last_ranks = np.apply_along_axis(st.rankdata, 0, first)
+ second_ranks = np.apply_along_axis(st.rankdata, 0, first)
+ return dist.cdist(self._last_ranks, second_ranks, metric='correlation')
+ ","class SpearmanDistance(DistanceMetric):
+ if first is not self._last:
+ self._last = first
+ self._last_ranks = np.apply_along_axis(st.rankdata, 0, first)
+ second_ranks = np.apply_along_axis(st.rankdata, 0, second)
+ return dist.cdist(self._last_ranks, second_ranks, metric='correlation')
+ "
+1923,https://:@github.com/takahi-i/hideout.git,49d6acc882c0d666ed214c5c33360b4e8ac2ea3b,"@@ -15,7 +15,7 @@ def resume(file_name):
+ with open(file_path, mode='rb') as f:
+ target = pickle.load(f)
+ yield target
+- if target is None:
++ if target is not None:
+ freeze(target, file_name)
+
+
+",hideout/__init__.py,"ReplaceText(target=' is not ' @(18,13)->(18,17))","def resume(file_name):
+ with open(file_path, mode='rb') as f:
+ target = pickle.load(f)
+ yield target
+ if target is None:
+ freeze(target, file_name)
+
+ ","def resume(file_name):
+ with open(file_path, mode='rb') as f:
+ target = pickle.load(f)
+ yield target
+ if target is not None:
+ freeze(target, file_name)
+
+ "
+1924,https://:@github.com/LordFlashmeow/pycent.git,a51cc6b53b9da5b5ee26026d51648eabbc9c0c61,"@@ -3,7 +3,7 @@ class pycent:
+ pass
+
+ def percent_of(self, percent, whole):
+- return (percent * whole) * 100
++ return (percent * whole) / 100
+
+ def percentage(self, part, whole):
+ return 100 * float(part)/float(whole)
+",pycent.py,"ReplaceText(target='/' @(6,33)->(6,34))","class pycent:
+ pass
+
+ def percent_of(self, percent, whole):
+ return (percent * whole) * 100
+
+ def percentage(self, part, whole):
+ return 100 * float(part)/float(whole)","class pycent:
+ pass
+
+ def percent_of(self, percent, whole):
+ return (percent * whole) / 100
+
+ def percentage(self, part, whole):
+ return 100 * float(part)/float(whole)"
+1925,https://:@github.com/jdrubin91/GeneLab-Microarray.git,06df0ad32f1d93ead0b76557cf1137b570eb82d2,"@@ -52,7 +52,7 @@ def run():
+
+ if batch:
+ import batch_process
+- batch_process.run(batch)
++ batch_process.run(indir)
+ else:
+ metadata_dir = os.path.join(indir,'metadata')
+ if os.path.isdir(metadata_dir):
+",GeneLab-Microarray/__main__.py,"ReplaceText(target='indir' @(55,26)->(55,31))","def run():
+
+ if batch:
+ import batch_process
+ batch_process.run(batch)
+ else:
+ metadata_dir = os.path.join(indir,'metadata')
+ if os.path.isdir(metadata_dir):","def run():
+
+ if batch:
+ import batch_process
+ batch_process.run(indir)
+ else:
+ metadata_dir = os.path.join(indir,'metadata')
+ if os.path.isdir(metadata_dir):"
+1926,https://:@github.com/kszucs/sequely.git,61dec39fd7d7ff2beb2dd051e761c2004f6dcbed,"@@ -680,7 +680,7 @@ class IsNullOperator(UnaryPostfixOperator):
+ """"""
+
+ def __init__(self, operand, invert=False):
+- super(IsNullOperator, self).__init__(u' IS NOT NULL' if invert else u' IS NULL', operand)
++ super(IsNullOperator, self).__init__(operand, u' IS NOT NULL' if invert else u' IS NULL')
+ self.invert = invert
+
+ def NOT(self):
+",sqlbuilder/sql.py,"ArgSwap(idxs=0<->1 @(683,8)->(683,44))","class IsNullOperator(UnaryPostfixOperator):
+ """"""
+
+ def __init__(self, operand, invert=False):
+ super(IsNullOperator, self).__init__(u' IS NOT NULL' if invert else u' IS NULL', operand)
+ self.invert = invert
+
+ def NOT(self):","class IsNullOperator(UnaryPostfixOperator):
+ """"""
+
+ def __init__(self, operand, invert=False):
+ super(IsNullOperator, self).__init__(operand, u' IS NOT NULL' if invert else u' IS NULL')
+ self.invert = invert
+
+ def NOT(self):"
+1927,https://:@github.com/muteria/muteria.git,6609a8e8e8acd2c0b5bcfbca516de7c746f02d14,"@@ -102,7 +102,7 @@ class MetaCriteriaTool(object):
+ self.tools_config_by_criterion_dict = tools_config_by_criterion_dict
+
+ # Verify Direct Arguments Variables
+- ERROR_HANDLER.assert_true(self.criteria_working_dir is None, \
++ ERROR_HANDLER.assert_true(self.criteria_working_dir is not None, \
+ ""Must specify criteria_working_dir"", __file__)
+ for criterion in self.tools_config_by_criterion_dict:
+ ERROR_HANDLER.assert_true( \
+",muteria/drivers/criteria/meta_testcriteriatool.py,"ReplaceText(target=' is not ' @(105,59)->(105,63))","class MetaCriteriaTool(object):
+ self.tools_config_by_criterion_dict = tools_config_by_criterion_dict
+
+ # Verify Direct Arguments Variables
+ ERROR_HANDLER.assert_true(self.criteria_working_dir is None, \
+ ""Must specify criteria_working_dir"", __file__)
+ for criterion in self.tools_config_by_criterion_dict:
+ ERROR_HANDLER.assert_true( \","class MetaCriteriaTool(object):
+ self.tools_config_by_criterion_dict = tools_config_by_criterion_dict
+
+ # Verify Direct Arguments Variables
+ ERROR_HANDLER.assert_true(self.criteria_working_dir is not None, \
+ ""Must specify criteria_working_dir"", __file__)
+ for criterion in self.tools_config_by_criterion_dict:
+ ERROR_HANDLER.assert_true( \"
+1928,https://:@github.com/muteria/muteria.git,6609a8e8e8acd2c0b5bcfbca516de7c746f02d14,"@@ -127,7 +127,7 @@ class MetaTestcaseTool(object):
+ self.test_tool_config_list = test_tool_config_list
+
+ # Verify Direct Arguments Variables
+- ERROR_HANDLER.assert_true(self.tests_working_dir is None, \
++ ERROR_HANDLER.assert_true(self.tests_working_dir is not None, \
+ ""Must specify tests_working_dir"", __file__)
+ ERROR_HANDLER.assert_true(len(self.test_tool_config_list) != \
+ len(set([c.get_tool_config_alias() for c in \
+",muteria/drivers/testgeneration/meta_testcasetool.py,"ReplaceText(target=' is not ' @(130,56)->(130,60))","class MetaTestcaseTool(object):
+ self.test_tool_config_list = test_tool_config_list
+
+ # Verify Direct Arguments Variables
+ ERROR_HANDLER.assert_true(self.tests_working_dir is None, \
+ ""Must specify tests_working_dir"", __file__)
+ ERROR_HANDLER.assert_true(len(self.test_tool_config_list) != \
+ len(set([c.get_tool_config_alias() for c in \","class MetaTestcaseTool(object):
+ self.test_tool_config_list = test_tool_config_list
+
+ # Verify Direct Arguments Variables
+ ERROR_HANDLER.assert_true(self.tests_working_dir is not None, \
+ ""Must specify tests_working_dir"", __file__)
+ ERROR_HANDLER.assert_true(len(self.test_tool_config_list) != \
+ len(set([c.get_tool_config_alias() for c in \"
+1929,https://:@github.com/muteria/muteria.git,43adff6c76b0fbeeacc6a87b54c29ac82b4d38e8,"@@ -56,7 +56,7 @@ class IdentityCodeConverter(BaseCodeFormatConverter):
+ for src, dest in list(file_src_dest_map.items()):
+ abs_src = os.path.join(self.repository_rootdir, src)
+ if os.path.abspath(abs_src) != os.path.abspath(dest):
+- shutil.copy2(src, dest)
++ shutil.copy2(abs_src, dest)
+ return DefaultCallbackObject.after_command(self)
+ #~ def after_command()
+ #~ class CopyCallbackObject
+",muteria/repositoryandcode/codes_convert_support.py,"ReplaceText(target='abs_src' @(59,33)->(59,36))","class IdentityCodeConverter(BaseCodeFormatConverter):
+ for src, dest in list(file_src_dest_map.items()):
+ abs_src = os.path.join(self.repository_rootdir, src)
+ if os.path.abspath(abs_src) != os.path.abspath(dest):
+ shutil.copy2(src, dest)
+ return DefaultCallbackObject.after_command(self)
+ #~ def after_command()
+ #~ class CopyCallbackObject","class IdentityCodeConverter(BaseCodeFormatConverter):
+ for src, dest in list(file_src_dest_map.items()):
+ abs_src = os.path.join(self.repository_rootdir, src)
+ if os.path.abspath(abs_src) != os.path.abspath(dest):
+ shutil.copy2(abs_src, dest)
+ return DefaultCallbackObject.after_command(self)
+ #~ def after_command()
+ #~ class CopyCallbackObject"
+1930,https://:@github.com/muteria/muteria.git,69571204b176aade524ca8d4259db5cf14550599,"@@ -489,7 +489,7 @@ class TestcasesToolKlee(BaseTestcaseTool):
+ KTestTestFormat.get_dir(dp, folders)) \
+ for dp in dup_tuple[1:]]
+ for df in dup_tuple[1:]:
+- if KTestTestFormat.get_dir(kt, folders) == \
++ if KTestTestFormat.get_dir(df, folders) == \
+ self.tests_storage_dir:
+ os.remove(df)
+ common_fs.dumpJSON(kepttest2duptest_map, self.keptktest2dupktests)
+",muteria/drivers/testgeneration/tools_by_languages/c/klee/klee.py,"ReplaceText(target='df' @(492,43)->(492,45))","class TestcasesToolKlee(BaseTestcaseTool):
+ KTestTestFormat.get_dir(dp, folders)) \
+ for dp in dup_tuple[1:]]
+ for df in dup_tuple[1:]:
+ if KTestTestFormat.get_dir(kt, folders) == \
+ self.tests_storage_dir:
+ os.remove(df)
+ common_fs.dumpJSON(kepttest2duptest_map, self.keptktest2dupktests)","class TestcasesToolKlee(BaseTestcaseTool):
+ KTestTestFormat.get_dir(dp, folders)) \
+ for dp in dup_tuple[1:]]
+ for df in dup_tuple[1:]:
+ if KTestTestFormat.get_dir(df, folders) == \
+ self.tests_storage_dir:
+ os.remove(df)
+ common_fs.dumpJSON(kepttest2duptest_map, self.keptktest2dupktests)"
+1931,https://:@github.com/muteria/muteria.git,99f435844fc4a30e5b8351943feee77c96f9630e,"@@ -56,7 +56,7 @@ class CliUserInterface(object):
+ parser_customexec = subparsers.add_parser('customexec', \
+ help=""Make some custom execution AFTER the""
+ "" main execution is done"")
+- parser_run.add_argument(""--nohashoutlog"", action='store_true', \
++ parser_customexec.add_argument(""--nohashoutlog"", action='store_true', \
+ help=""When set, enforce no hash log"")
+
+ if len(sys.argv)==1:
+",muteria/cli/cli.py,"ReplaceText(target='parser_customexec' @(59,8)->(59,18))","class CliUserInterface(object):
+ parser_customexec = subparsers.add_parser('customexec', \
+ help=""Make some custom execution AFTER the""
+ "" main execution is done"")
+ parser_run.add_argument(""--nohashoutlog"", action='store_true', \
+ help=""When set, enforce no hash log"")
+
+ if len(sys.argv)==1:","class CliUserInterface(object):
+ parser_customexec = subparsers.add_parser('customexec', \
+ help=""Make some custom execution AFTER the""
+ "" main execution is done"")
+ parser_customexec.add_argument(""--nohashoutlog"", action='store_true', \
+ help=""When set, enforce no hash log"")
+
+ if len(sys.argv)==1:"
+1932,https://:@github.com/Tetrite/cBinder.git,36123e9438d3dd26c34c95a5e6de613ddcb0d788,"@@ -17,7 +17,7 @@ def get_definitions_pairs(defines_list):
+ def_pairs = {}
+ for define_statement_string in defines_list:
+ elems = re.split("" "", define_statement_string)
+- if len(elems) > 3: # When define statement is not a simple NAME <--> VALUE PAIR
++ if len(elems) != 3: # When define statement is not a simple NAME <--> VALUE PAIR
+ continue # Do not preprocess this
+ name = elems[1]
+ value = elems[2]
+",MiniPreprocessing.py,"ReplaceText(target='!=' @(20,22)->(20,23))","def get_definitions_pairs(defines_list):
+ def_pairs = {}
+ for define_statement_string in defines_list:
+ elems = re.split("" "", define_statement_string)
+ if len(elems) > 3: # When define statement is not a simple NAME <--> VALUE PAIR
+ continue # Do not preprocess this
+ name = elems[1]
+ value = elems[2]","def get_definitions_pairs(defines_list):
+ def_pairs = {}
+ for define_statement_string in defines_list:
+ elems = re.split("" "", define_statement_string)
+ if len(elems) != 3: # When define statement is not a simple NAME <--> VALUE PAIR
+ continue # Do not preprocess this
+ name = elems[1]
+ value = elems[2]"
+1933,https://:@github.com/CovertLab/vivarium.git,7a3dc56b996fd44f4c028dcd299e2fc78cbb3144,"@@ -133,7 +133,7 @@ class Motor(Analysis):
+ max_length = max(run_lengths + tumble_lengths)
+ bins = np.linspace(0, max_length, 10)
+ logbins = np.logspace(0, np.log10(bins[-1]), len(bins))
+- ax5.hist([run_lengths, tumble_lengths], bins=logbins, label=['run_lengths', 'tumble_lengths'], color=['b', 'm'])
++ ax5.hist([run_lengths, tumble_lengths], bins=bins, label=['run_lengths', 'tumble_lengths'], color=['b', 'm'])
+
+ # plot expected values
+ ax5.axvline(x=expected_tumble, color='m', linestyle='dashed', label='expected tumble')
+",vivarium/analysis/motor.py,"ReplaceText(target='bins' @(136,53)->(136,60))","class Motor(Analysis):
+ max_length = max(run_lengths + tumble_lengths)
+ bins = np.linspace(0, max_length, 10)
+ logbins = np.logspace(0, np.log10(bins[-1]), len(bins))
+ ax5.hist([run_lengths, tumble_lengths], bins=logbins, label=['run_lengths', 'tumble_lengths'], color=['b', 'm'])
+
+ # plot expected values
+ ax5.axvline(x=expected_tumble, color='m', linestyle='dashed', label='expected tumble')","class Motor(Analysis):
+ max_length = max(run_lengths + tumble_lengths)
+ bins = np.linspace(0, max_length, 10)
+ logbins = np.logspace(0, np.log10(bins[-1]), len(bins))
+ ax5.hist([run_lengths, tumble_lengths], bins=bins, label=['run_lengths', 'tumble_lengths'], color=['b', 'm'])
+
+ # plot expected values
+ ax5.axvline(x=expected_tumble, color='m', linestyle='dashed', label='expected tumble')"
+1934,https://:@github.com/CovertLab/vivarium.git,365a08b14a6d25915605e68c586933f702b4994c,"@@ -43,7 +43,7 @@ class ShepherdControl(ActorControl):
+ experiment_id, number, agent_type, environment_type))
+
+ # boot environment
+- self.add_agent(experiment_id, environment_type, lattice_config)
++ self.add_agent(experiment_id, environment_type, actor_config)
+ time.sleep(10) # wait for the environment to boot
+
+ # boot agents
+",vivarium/environment/control.py,"ReplaceText(target='actor_config' @(46,56)->(46,70))","class ShepherdControl(ActorControl):
+ experiment_id, number, agent_type, environment_type))
+
+ # boot environment
+ self.add_agent(experiment_id, environment_type, lattice_config)
+ time.sleep(10) # wait for the environment to boot
+
+ # boot agents","class ShepherdControl(ActorControl):
+ experiment_id, number, agent_type, environment_type))
+
+ # boot environment
+ self.add_agent(experiment_id, environment_type, actor_config)
+ time.sleep(10) # wait for the environment to boot
+
+ # boot agents"
+1935,https://:@github.com/CovertLab/vivarium.git,7b17a044e3d13866f61e7530952f5da27f21e896,"@@ -771,7 +771,7 @@ def load_compartment(composite, boot_config={}):
+ 'emitter': boot_config.get('emitter', 'timeseries'),
+ 'time_step': boot_config.get('time_step', 1.0)})
+
+- return Compartment(processes, states, derivers, options)
++ return Compartment(processes, derivers, states, options)
+
+
+ def simulate_compartment(compartment, settings={}):
+",vivarium/compartment/composition.py,"ArgSwap(idxs=1<->2 @(774,11)->(774,22))","def load_compartment(composite, boot_config={}):
+ 'emitter': boot_config.get('emitter', 'timeseries'),
+ 'time_step': boot_config.get('time_step', 1.0)})
+
+ return Compartment(processes, states, derivers, options)
+
+
+ def simulate_compartment(compartment, settings={}):","def load_compartment(composite, boot_config={}):
+ 'emitter': boot_config.get('emitter', 'timeseries'),
+ 'time_step': boot_config.get('time_step', 1.0)})
+
+ return Compartment(processes, derivers, states, options)
+
+
+ def simulate_compartment(compartment, settings={}):"
+1936,https://:@github.com/CovertLab/vivarium.git,049723f40d7994f2511f9b52e72082152a88cc3d,"@@ -67,7 +67,7 @@ def plot_signal_transduction(timeseries, out_dir='out', filename='signal_transdu
+ ax2.tick_params(right=False, top=False)
+ ax2.set_ylabel(""cluster activity \n P(on)"", fontsize=10)
+
+- ax2.set_xticklabels([])
++ ax3.set_xticklabels([])
+ ax3.spines['right'].set_visible(False)
+ ax3.spines['top'].set_visible(False)
+ ax3.tick_params(right=False, top=False)
+",vivarium/plots/chemotaxis_flagella.py,"ReplaceText(target='ax3' @(70,4)->(70,7))","def plot_signal_transduction(timeseries, out_dir='out', filename='signal_transdu
+ ax2.tick_params(right=False, top=False)
+ ax2.set_ylabel(""cluster activity \n P(on)"", fontsize=10)
+
+ ax2.set_xticklabels([])
+ ax3.spines['right'].set_visible(False)
+ ax3.spines['top'].set_visible(False)
+ ax3.tick_params(right=False, top=False)","def plot_signal_transduction(timeseries, out_dir='out', filename='signal_transdu
+ ax2.tick_params(right=False, top=False)
+ ax2.set_ylabel(""cluster activity \n P(on)"", fontsize=10)
+
+ ax3.set_xticklabels([])
+ ax3.spines['right'].set_visible(False)
+ ax3.spines['top'].set_visible(False)
+ ax3.tick_params(right=False, top=False)"
+1937,https://:@github.com/wtsi-hgi/gitlab-build-variables.git,da55a3494cb0c375b5efb9f5248f0f3774d9c0c5,"@@ -63,7 +63,7 @@ class ProjectVariablesUpdater(VariablesUpdater):
+ _logger.info(""Set variables for \""%s\"": %s"" % (self.project, variables))
+
+ def update_required(self) -> bool:
+- return self._variables_manager.get_variables() == self._get_required_variables()
++ return self._variables_manager.get_variables() != self._get_required_variables()
+
+ def _get_required_variables(self) -> Dict[str, str]:
+ """"""
+",gitlabbuildvariables/updater.py,"ReplaceText(target='!=' @(66,55)->(66,57))","class ProjectVariablesUpdater(VariablesUpdater):
+ _logger.info(""Set variables for \""%s\"": %s"" % (self.project, variables))
+
+ def update_required(self) -> bool:
+ return self._variables_manager.get_variables() == self._get_required_variables()
+
+ def _get_required_variables(self) -> Dict[str, str]:
+ """"""","class ProjectVariablesUpdater(VariablesUpdater):
+ _logger.info(""Set variables for \""%s\"": %s"" % (self.project, variables))
+
+ def update_required(self) -> bool:
+ return self._variables_manager.get_variables() != self._get_required_variables()
+
+ def _get_required_variables(self) -> Dict[str, str]:
+ """""""
+1938,https://:@github.com/felfel/logging-py.git,27cc7bab2404993e04a07ee8f676fb646bd0f640,"@@ -115,7 +115,7 @@ class LogEntryParser:
+ Logger.data_property_placeholder_name: data # here we set the data property with a special key
+ }
+
+- if log_entry.message is not """" or log_entry.message is not None:
++ if log_entry.message is not """" and log_entry.message is not None:
+ dto[""message""] = log_entry.message
+
+ if exception_info is not None:
+",loggingpy/log.py,"ReplaceText(target='and' @(118,39)->(118,41))","class LogEntryParser:
+ Logger.data_property_placeholder_name: data # here we set the data property with a special key
+ }
+
+ if log_entry.message is not """" or log_entry.message is not None:
+ dto[""message""] = log_entry.message
+
+ if exception_info is not None:","class LogEntryParser:
+ Logger.data_property_placeholder_name: data # here we set the data property with a special key
+ }
+
+ if log_entry.message is not """" and log_entry.message is not None:
+ dto[""message""] = log_entry.message
+
+ if exception_info is not None:"
+1939,https://:@github.com/urban48/debpackager.git,fa24b2f2eb79059ec65edb8fc32eb1aaa46e689c,"@@ -94,7 +94,7 @@ class GeneralPackage(object):
+ install_path=deb.get('install_path'),
+ dependencies=deb_dependencies,
+ description=deb.get('description'),
+- excludes=project.get('excludes', []))
++ excludes=deb.get('excludes', []))
+
+ generated_builds.append(dpm.generate())
+ return generated_builds
+",debpackager/packages/general_package.py,"ReplaceText(target='deb' @(97,31)->(97,38))","class GeneralPackage(object):
+ install_path=deb.get('install_path'),
+ dependencies=deb_dependencies,
+ description=deb.get('description'),
+ excludes=project.get('excludes', []))
+
+ generated_builds.append(dpm.generate())
+ return generated_builds","class GeneralPackage(object):
+ install_path=deb.get('install_path'),
+ dependencies=deb_dependencies,
+ description=deb.get('description'),
+ excludes=deb.get('excludes', []))
+
+ generated_builds.append(dpm.generate())
+ return generated_builds"
+1940,https://:@github.com/noobermin/lspreader.git,4ab4049cfe95c5927f01406bd6a4653335752904,"@@ -88,7 +88,7 @@ if __name__ == ""__main__"":
+ else:
+ angleopt = None;
+ KE, good = totalKE(d, ecut, angleopt, return_bools=True);
+- LE = laserE(E_0, w, T, dim=dim);
++ LE = laserE(E_0, T, w, dim=dim);
+ totalq = d['q'][good].sum()*1e12;
+ print('total charge: {} {}'.format(totalq,'pC/cm' if opts['--2D'] else 'pC'));
+ print(""total energy: {} J"".format(KE));
+",pext/quantities.py,"ArgSwap(idxs=1<->2 @(91,9)->(91,15))","if __name__ == ""__main__"":
+ else:
+ angleopt = None;
+ KE, good = totalKE(d, ecut, angleopt, return_bools=True);
+ LE = laserE(E_0, w, T, dim=dim);
+ totalq = d['q'][good].sum()*1e12;
+ print('total charge: {} {}'.format(totalq,'pC/cm' if opts['--2D'] else 'pC'));
+ print(""total energy: {} J"".format(KE));","if __name__ == ""__main__"":
+ else:
+ angleopt = None;
+ KE, good = totalKE(d, ecut, angleopt, return_bools=True);
+ LE = laserE(E_0, T, w, dim=dim);
+ totalq = d['q'][good].sum()*1e12;
+ print('total charge: {} {}'.format(totalq,'pC/cm' if opts['--2D'] else 'pC'));
+ print(""total energy: {} J"".format(KE));"
+1941,https://:@github.com/andycasey/sick.git,580f4072957817f483ed79de3f6b5208a07cfc42,"@@ -516,7 +516,7 @@ def load_aaomega_multispec(filename, fill_value=-1, clean=True):
+ for i, index in enumerate(program_indices):
+
+ headers = base_headers.copy()
+- headers['FIBRE_NUM'] = i + 1
++ headers['FIBRE_NUM'] = index + 1
+
+ for header in req_fibre_headers:
+ headers[header] = image[2].data[index][header]
+",scope/specutils.py,"ReplaceText(target='index' @(519,31)->(519,32))","def load_aaomega_multispec(filename, fill_value=-1, clean=True):
+ for i, index in enumerate(program_indices):
+
+ headers = base_headers.copy()
+ headers['FIBRE_NUM'] = i + 1
+
+ for header in req_fibre_headers:
+ headers[header] = image[2].data[index][header]","def load_aaomega_multispec(filename, fill_value=-1, clean=True):
+ for i, index in enumerate(program_indices):
+
+ headers = base_headers.copy()
+ headers['FIBRE_NUM'] = index + 1
+
+ for header in req_fibre_headers:
+ headers[header] = image[2].data[index][header]"
+1942,https://:@github.com/gilsondev/django-faleconosco.git,eb394ea946b658ffe4706620e12a0992e847ae4c,"@@ -26,7 +26,7 @@ def form(request, template_name='contato/contato_form.html',
+ mensagem.update(dict)
+
+ # Enviando o email
+- enviar_email(email, settings.DEFAULT_FROM_EMAIL, nome,
++ enviar_email(settings.DEFAULT_FROM_EMAIL, email, nome,
+ assunto, template_email, mensagem)
+
+ # Mostra mensagem de sucesso
+",contato/views.py,"ArgSwap(idxs=0<->1 @(29,8)->(29,20))","def form(request, template_name='contato/contato_form.html',
+ mensagem.update(dict)
+
+ # Enviando o email
+ enviar_email(email, settings.DEFAULT_FROM_EMAIL, nome,
+ assunto, template_email, mensagem)
+
+ # Mostra mensagem de sucesso","def form(request, template_name='contato/contato_form.html',
+ mensagem.update(dict)
+
+ # Enviando o email
+ enviar_email(settings.DEFAULT_FROM_EMAIL, email, nome,
+ assunto, template_email, mensagem)
+
+ # Mostra mensagem de sucesso"
+1943,https://:@github.com/lijinbio/cmsip.git,a9ac427f65d7fe2dd116b01d2506261686700231,"@@ -115,7 +115,7 @@ def bsmap(config):
+ def mcall_stat_parse(infile):
+ with open(infile) as f:
+ dstr=f.read()
+- return float(re.search('bisulfite conversion ratio = ([\d.]+)', f).groups()[0])
++ return float(re.search('bisulfite conversion ratio = ([\d.]+)', dstr).groups()[0])
+
+ def mcall_runcmd(infile, outdir, sampleid, reference, numthread, verbose=False):
+ if os.path.exists(outdir):
+",cmsip/cmsip.py,"ReplaceText(target='dstr' @(118,65)->(118,66))","def bsmap(config):
+ def mcall_stat_parse(infile):
+ with open(infile) as f:
+ dstr=f.read()
+ return float(re.search('bisulfite conversion ratio = ([\d.]+)', f).groups()[0])
+
+ def mcall_runcmd(infile, outdir, sampleid, reference, numthread, verbose=False):
+ if os.path.exists(outdir):","def bsmap(config):
+ def mcall_stat_parse(infile):
+ with open(infile) as f:
+ dstr=f.read()
+ return float(re.search('bisulfite conversion ratio = ([\d.]+)', dstr).groups()[0])
+
+ def mcall_runcmd(infile, outdir, sampleid, reference, numthread, verbose=False):
+ if os.path.exists(outdir):"
+1944,https://:@github.com/TwoRavens/raven-metadata-service.git,dae36f1eab88f12cfb14d451124cc9d293f89ce0,"@@ -34,7 +34,7 @@ class PlotValuesUtil(object):
+
+ # x-data for the ECDF: x_
+ x_value = np.sort(data)
+- size_data = x_value.size
++ size_data = raw_data.size
+ # y-data for the ECDF: y
+ y_value = []
+
+",preprocess/code/plot_values.py,"ReplaceText(target='raw_data' @(37,20)->(37,27))","class PlotValuesUtil(object):
+
+ # x-data for the ECDF: x_
+ x_value = np.sort(data)
+ size_data = x_value.size
+ # y-data for the ECDF: y
+ y_value = []
+ ","class PlotValuesUtil(object):
+
+ # x-data for the ECDF: x_
+ x_value = np.sort(data)
+ size_data = raw_data.size
+ # y-data for the ECDF: y
+ y_value = []
+ "
+1945,https://:@github.com/TwoRavens/raven-metadata-service.git,1c19733c86b514a93342126535de899aed40b40e,"@@ -137,7 +137,7 @@ class JobUtil(object):
+
+ @staticmethod
+ def retrieve_rows_csv(request, job, **kwargs):
+- if request.method != 'POST':
++ if request.method == 'POST':
+ print('kwargs', kwargs)
+ start_row = kwargs.get('start_row')
+ num_rows = kwargs.get('number_rows')
+",preprocess_web/code/ravens_metadata_apps/preprocess_jobs/job_util.py,"ReplaceText(target='==' @(140,26)->(140,28))","class JobUtil(object):
+
+ @staticmethod
+ def retrieve_rows_csv(request, job, **kwargs):
+ if request.method != 'POST':
+ print('kwargs', kwargs)
+ start_row = kwargs.get('start_row')
+ num_rows = kwargs.get('number_rows')","class JobUtil(object):
+
+ @staticmethod
+ def retrieve_rows_csv(request, job, **kwargs):
+ if request.method == 'POST':
+ print('kwargs', kwargs)
+ start_row = kwargs.get('start_row')
+ num_rows = kwargs.get('number_rows')"
+1946,https://:@github.com/Clinical-Genomics/cgbeacon.git,98f6705d3e6971111831cedfc4926e84880ec341,"@@ -74,7 +74,7 @@ def cli( dataset, vcf, db_connection, qual, ref, use_panel, outfile, customer, s
+ vcfsamples = _compare_samples(vcfsamples, samples)
+
+ ## returns a this tuple-> ( total_vars, beacon_vars(type: dict), discaded_vars(type: dict))
+- vcf_results = get_variants(vcf_obj, vcfsamples, raw_variants, qual)
++ vcf_results = get_variants(vcf_obj, raw_variants , vcfsamples, qual)
+
+ ## Print overall results of VCF file parsing to terminal
+ vars_to_beacon = _print_results(vcf_results, qual)
+",cgbeacon/cli/root.py,"ArgSwap(idxs=1<->2 @(77,18)->(77,30))","def cli( dataset, vcf, db_connection, qual, ref, use_panel, outfile, customer, s
+ vcfsamples = _compare_samples(vcfsamples, samples)
+
+ ## returns a this tuple-> ( total_vars, beacon_vars(type: dict), discaded_vars(type: dict))
+ vcf_results = get_variants(vcf_obj, vcfsamples, raw_variants, qual)
+
+ ## Print overall results of VCF file parsing to terminal
+ vars_to_beacon = _print_results(vcf_results, qual)","def cli( dataset, vcf, db_connection, qual, ref, use_panel, outfile, customer, s
+ vcfsamples = _compare_samples(vcfsamples, samples)
+
+ ## returns a this tuple-> ( total_vars, beacon_vars(type: dict), discaded_vars(type: dict))
+ vcf_results = get_variants(vcf_obj, raw_variants , vcfsamples, qual)
+
+ ## Print overall results of VCF file parsing to terminal
+ vars_to_beacon = _print_results(vcf_results, qual)"
+1947,https://:@github.com/Clinical-Genomics/cgbeacon.git,98f6705d3e6971111831cedfc4926e84880ec341,"@@ -38,7 +38,7 @@ def beacon_upload(connection, vcf_path, panel_path, dataset, outfile="""", custome
+ # returns a this tuple-> ( n_total_vars, beacon_vars(type: dict), discaded_vars(type: dict))
+ ### beacon_vars is a disctionary with key --> sample, and value --> list of tuples containing the non-reference variants. Each tuple is defined as: (chr, start, alt_allele)
+ ### discaded_vars is a dictionary with key --> sample and value --> number of discarded vars due to quality for that sample.
+- vcf_results = get_variants(panel_filtered_results[0], samples, raw_variants, qual)
++ vcf_results = get_variants(panel_filtered_results[0], raw_variants, samples, qual)
+
+ # Insert variants into the beacon. It returns a tuple: (vars_before_upload, vars_after_upload)
+ beacon_update_result = bare_variants_uploader(connection, dataset, vcf_results, genome_reference)
+",cgbeacon/utils/Utility.py,"ArgSwap(idxs=1<->2 @(41,18)->(41,30))","def beacon_upload(connection, vcf_path, panel_path, dataset, outfile="""", custome
+ # returns a this tuple-> ( n_total_vars, beacon_vars(type: dict), discaded_vars(type: dict))
+ ### beacon_vars is a disctionary with key --> sample, and value --> list of tuples containing the non-reference variants. Each tuple is defined as: (chr, start, alt_allele)
+ ### discaded_vars is a dictionary with key --> sample and value --> number of discarded vars due to quality for that sample.
+ vcf_results = get_variants(panel_filtered_results[0], samples, raw_variants, qual)
+
+ # Insert variants into the beacon. It returns a tuple: (vars_before_upload, vars_after_upload)
+ beacon_update_result = bare_variants_uploader(connection, dataset, vcf_results, genome_reference)","def beacon_upload(connection, vcf_path, panel_path, dataset, outfile="""", custome
+ # returns a this tuple-> ( n_total_vars, beacon_vars(type: dict), discaded_vars(type: dict))
+ ### beacon_vars is a disctionary with key --> sample, and value --> list of tuples containing the non-reference variants. Each tuple is defined as: (chr, start, alt_allele)
+ ### discaded_vars is a dictionary with key --> sample and value --> number of discarded vars due to quality for that sample.
+ vcf_results = get_variants(panel_filtered_results[0], raw_variants, samples, qual)
+
+ # Insert variants into the beacon. It returns a tuple: (vars_before_upload, vars_after_upload)
+ beacon_update_result = bare_variants_uploader(connection, dataset, vcf_results, genome_reference)"
+1948,https://:@github.com/magistral-io/MagistralPython.git,29e567448385b02c287ffeb64593ca21d745b23b,"@@ -84,7 +84,7 @@ class JsonConverter(object):
+ for ch in channels:
+ permissions[int(ch)] = (read, write)
+ else:
+- permissions[int(ch)] = (read, write)
++ permissions[int(channels)] = (read, write)
+
+ return permissions;
+
+",src/magistral/client/util/JsonConverter.py,"ReplaceText(target='channels' @(87,28)->(87,30))","class JsonConverter(object):
+ for ch in channels:
+ permissions[int(ch)] = (read, write)
+ else:
+ permissions[int(ch)] = (read, write)
+
+ return permissions;
+ ","class JsonConverter(object):
+ for ch in channels:
+ permissions[int(ch)] = (read, write)
+ else:
+ permissions[int(channels)] = (read, write)
+
+ return permissions;
+ "
+1949,https://:@github.com/ebachelet/pyLIMA.git,1e18750dcdf80430af3b48a8225110bcbdc70447,"@@ -26,7 +26,7 @@ def microlensing_flux_priors(size_dataset, f_source, g_blending):
+
+
+ def microlensing_parameters_limits_priors(parameters, limits):
+- for i in xrange(len(parameters)):
++ for i in xrange(len(limits)):
+
+ if (parameters[i] > limits[i][1]) | (parameters[i] < limits[i][0]):
+
+",pyLIMA/microlpriors.py,"ReplaceText(target='limits' @(29,24)->(29,34))","def microlensing_flux_priors(size_dataset, f_source, g_blending):
+
+
+ def microlensing_parameters_limits_priors(parameters, limits):
+ for i in xrange(len(parameters)):
+
+ if (parameters[i] > limits[i][1]) | (parameters[i] < limits[i][0]):
+ ","def microlensing_flux_priors(size_dataset, f_source, g_blending):
+
+
+ def microlensing_parameters_limits_priors(parameters, limits):
+ for i in xrange(len(limits)):
+
+ if (parameters[i] > limits[i][1]) | (parameters[i] < limits[i][0]):
+ "
+1950,https://:@github.com/ebachelet/pyLIMA.git,7b358f94c59afc973bce950f1a0051fe74693e80,"@@ -178,7 +178,7 @@ def sort_2lenses_wide_caustics(caustic_points, critical_curves_points):
+ first_branch = positive_y_branches[0]
+ second_branch = positive_y_branches[1]
+
+- if np.max((caustic_points[:, first_branch]).real) > np.max((caustic_points[:, second_branch]).real):
++ if np.max((caustic_points[:, first_branch]).real) < np.max((caustic_points[:, second_branch]).real):
+
+ central_caustic = np.r_[caustic_points[:, first_branch], np.conj(caustic_points[:, first_branch])[::-1]]
+ central_cc = np.r_[critical_curves_points[:, first_branch],
+",pyLIMA/microlcaustics.py,"ReplaceText(target='<' @(181,58)->(181,59))","def sort_2lenses_wide_caustics(caustic_points, critical_curves_points):
+ first_branch = positive_y_branches[0]
+ second_branch = positive_y_branches[1]
+
+ if np.max((caustic_points[:, first_branch]).real) > np.max((caustic_points[:, second_branch]).real):
+
+ central_caustic = np.r_[caustic_points[:, first_branch], np.conj(caustic_points[:, first_branch])[::-1]]
+ central_cc = np.r_[critical_curves_points[:, first_branch],","def sort_2lenses_wide_caustics(caustic_points, critical_curves_points):
+ first_branch = positive_y_branches[0]
+ second_branch = positive_y_branches[1]
+
+ if np.max((caustic_points[:, first_branch]).real) < np.max((caustic_points[:, second_branch]).real):
+
+ central_caustic = np.r_[caustic_points[:, first_branch], np.conj(caustic_points[:, first_branch])[::-1]]
+ central_cc = np.r_[critical_curves_points[:, first_branch],"
+1951,https://:@github.com/RedFantom/mtTkinter.git,666f0351850ba1eed400e49ca33b2291cb6f3fb3,"@@ -141,7 +141,7 @@ class _TkAttr(object):
+ if is_exception:
+ ex_type, ex_value, ex_tb = response
+ raise ex_type(ex_value, ex_tb)
+- return response_queue
++ return response
+
+
+ def _Tk__init__(self, *args, **kwargs):
+",mttkinter/mtTkinter.py,"ReplaceText(target='response' @(144,23)->(144,37))","class _TkAttr(object):
+ if is_exception:
+ ex_type, ex_value, ex_tb = response
+ raise ex_type(ex_value, ex_tb)
+ return response_queue
+
+
+ def _Tk__init__(self, *args, **kwargs):","class _TkAttr(object):
+ if is_exception:
+ ex_type, ex_value, ex_tb = response
+ raise ex_type(ex_value, ex_tb)
+ return response
+
+
+ def _Tk__init__(self, *args, **kwargs):"
+1952,https://:@github.com/wheeler-microfluidics/dmf-device-ui.git,2443e29f710e516ebb3df7fc56db4f7e56f75893,"@@ -454,7 +454,7 @@ class DmfDeviceViewBase(SlaveView):
+ # Find the closest corner point in the frame to the starting point.
+ frame_corner_i = find_closest(slave.df_frame_corners, frame_point_i)
+ # Find the closest corner point in the canvas to the end point.
+- canvas_corner_i = find_closest(slave.df_canvas_corners, end_xy)
++ canvas_corner_i = find_closest(slave.df_canvas_corners, start_xy)
+
+ # Save current state of corners to allow undo.
+ corners_state = {'df_frame_corners':
+",dmf_device_ui/view.py,"ReplaceText(target='start_xy' @(457,64)->(457,70))","class DmfDeviceViewBase(SlaveView):
+ # Find the closest corner point in the frame to the starting point.
+ frame_corner_i = find_closest(slave.df_frame_corners, frame_point_i)
+ # Find the closest corner point in the canvas to the end point.
+ canvas_corner_i = find_closest(slave.df_canvas_corners, end_xy)
+
+ # Save current state of corners to allow undo.
+ corners_state = {'df_frame_corners':","class DmfDeviceViewBase(SlaveView):
+ # Find the closest corner point in the frame to the starting point.
+ frame_corner_i = find_closest(slave.df_frame_corners, frame_point_i)
+ # Find the closest corner point in the canvas to the end point.
+ canvas_corner_i = find_closest(slave.df_canvas_corners, start_xy)
+
+ # Save current state of corners to allow undo.
+ corners_state = {'df_frame_corners':"
+1953,https://:@github.com/jisunglim/ethereum-etl.git,f7e7e55441816e291d73a90c3aa19e287b881989,"@@ -247,7 +247,7 @@ while True:
+ token_transfers = token_transfers_item_exporter.get_items('token_transfer')
+
+ enriched_transactions = enrich_transactions(blocks, transactions, receipts)
+- if len(enriched_transactions) == len(transactions):
++ if len(enriched_transactions) != len(transactions):
+ raise ValueError('The number of transactions is wrong ' + str(enriched_transactions))
+ enriched_logs = enrich_logs(blocks, logs)
+ if len(enriched_logs) != len(logs):
+",stream.py,"ReplaceText(target='!=' @(250,38)->(250,40))","while True:
+ token_transfers = token_transfers_item_exporter.get_items('token_transfer')
+
+ enriched_transactions = enrich_transactions(blocks, transactions, receipts)
+ if len(enriched_transactions) == len(transactions):
+ raise ValueError('The number of transactions is wrong ' + str(enriched_transactions))
+ enriched_logs = enrich_logs(blocks, logs)
+ if len(enriched_logs) != len(logs):","while True:
+ token_transfers = token_transfers_item_exporter.get_items('token_transfer')
+
+ enriched_transactions = enrich_transactions(blocks, transactions, receipts)
+ if len(enriched_transactions) != len(transactions):
+ raise ValueError('The number of transactions is wrong ' + str(enriched_transactions))
+ enriched_logs = enrich_logs(blocks, logs)
+ if len(enriched_logs) != len(logs):"
+1954,https://:@github.com/cpnota/autonomous-learning-library.git,a0debf34fdff31c56e93b572edfe2b1578772c77,"@@ -18,7 +18,7 @@ class TestAccumulatingTraces(unittest.TestCase):
+ self.basis = FourierBasis(space, 2, 2)
+ self.approximation = DiscreteLinearApproximation(0.1, self.basis, actions=3)
+ self.env = Env()
+- self.traces = AccumulatingTraces(self.env, self.approximation, 0.5)
++ self.traces = AccumulatingTraces(self.approximation, self.env, 0.5)
+
+ def test_init(self):
+ np.testing.assert_equal(self.traces.call(x), np.array([0, 0, 0]))
+",all/approximation/traces/accumulating_test.py,"ArgSwap(idxs=0<->1 @(21,18)->(21,36))","class TestAccumulatingTraces(unittest.TestCase):
+ self.basis = FourierBasis(space, 2, 2)
+ self.approximation = DiscreteLinearApproximation(0.1, self.basis, actions=3)
+ self.env = Env()
+ self.traces = AccumulatingTraces(self.env, self.approximation, 0.5)
+
+ def test_init(self):
+ np.testing.assert_equal(self.traces.call(x), np.array([0, 0, 0]))","class TestAccumulatingTraces(unittest.TestCase):
+ self.basis = FourierBasis(space, 2, 2)
+ self.approximation = DiscreteLinearApproximation(0.1, self.basis, actions=3)
+ self.env = Env()
+ self.traces = AccumulatingTraces(self.approximation, self.env, 0.5)
+
+ def test_init(self):
+ np.testing.assert_equal(self.traces.call(x), np.array([0, 0, 0]))"
+1955,https://:@github.com/cpnota/autonomous-learning-library.git,f6c89200ee016ac98c856254defdaf52cc8ba454,"@@ -18,7 +18,7 @@ class TestLinearFunctionApproximation(unittest.TestCase):
+ approximation = LinearApproximation(0.1, basis)
+ x = np.array([0.5, 1])
+ self.assertEqual(approximation.call(x), 0)
+- approximation.update(x, 1)
++ approximation.update(1, x)
+ self.assertAlmostEqual(approximation.call(x), 0.6)
+
+ if __name__ == '__main__':
+",all/approximation/state/linear_test.py,"ArgSwap(idxs=0<->1 @(21,4)->(21,24))","class TestLinearFunctionApproximation(unittest.TestCase):
+ approximation = LinearApproximation(0.1, basis)
+ x = np.array([0.5, 1])
+ self.assertEqual(approximation.call(x), 0)
+ approximation.update(x, 1)
+ self.assertAlmostEqual(approximation.call(x), 0.6)
+
+ if __name__ == '__main__':","class TestLinearFunctionApproximation(unittest.TestCase):
+ approximation = LinearApproximation(0.1, basis)
+ x = np.array([0.5, 1])
+ self.assertEqual(approximation.call(x), 0)
+ approximation.update(1, x)
+ self.assertAlmostEqual(approximation.call(x), 0.6)
+
+ if __name__ == '__main__':"
+1956,https://:@github.com/redhog/fcdjangoutils.git,8302cf9148f8034930d5dca7f46392431a3ed866,"@@ -35,7 +35,7 @@ def duration_verbose(duration):
+
+ if minutes != 0:
+ if not first: res += "", ""
+- res += _(""%d min"") % hours;
++ res += _(""%d min"") % minutes;
+ first = False
+
+ if seconds != 0:
+",templatetags/time_tags.py,"ReplaceText(target='minutes' @(38,29)->(38,34))","def duration_verbose(duration):
+
+ if minutes != 0:
+ if not first: res += "", ""
+ res += _(""%d min"") % hours;
+ first = False
+
+ if seconds != 0:","def duration_verbose(duration):
+
+ if minutes != 0:
+ if not first: res += "", ""
+ res += _(""%d min"") % minutes;
+ first = False
+
+ if seconds != 0:"
+1957,https://:@github.com/chairbender/fantasy-football-auction.git,2f31b12d9fccae46e4ad6f389808f9b93046ad1b,"@@ -189,7 +189,7 @@ class Auction:
+
+ if self.state != AuctionState.BID:
+ raise InvalidActionError(""Bid was attempted, but it is not currently time to submit bids."")
+- elif self.bid > bid:
++ elif self.bid >= bid:
+ raise InvalidActionError(""Bid amount "" + str(bid) + "" must be greater than current bid of "" + str(self.bid))
+ elif not self.owners[owner_id].can_buy(self.nominee, bid):
+ raise InvalidActionError(""The owner with index "" + str(owner_id) +
+",fantasy_football_auction/auction.py,"ReplaceText(target='>=' @(192,22)->(192,23))","class Auction:
+
+ if self.state != AuctionState.BID:
+ raise InvalidActionError(""Bid was attempted, but it is not currently time to submit bids."")
+ elif self.bid > bid:
+ raise InvalidActionError(""Bid amount "" + str(bid) + "" must be greater than current bid of "" + str(self.bid))
+ elif not self.owners[owner_id].can_buy(self.nominee, bid):
+ raise InvalidActionError(""The owner with index "" + str(owner_id) +","class Auction:
+
+ if self.state != AuctionState.BID:
+ raise InvalidActionError(""Bid was attempted, but it is not currently time to submit bids."")
+ elif self.bid >= bid:
+ raise InvalidActionError(""Bid amount "" + str(bid) + "" must be greater than current bid of "" + str(self.bid))
+ elif not self.owners[owner_id].can_buy(self.nominee, bid):
+ raise InvalidActionError(""The owner with index "" + str(owner_id) +"
+1958,https://:@github.com/slazarov/python-signalr-client.git,33f58244b15ab6056cb0a0ad4ad53b040aacb8e8,"@@ -40,7 +40,7 @@ class HubClient(object):
+ if hub.lower() == self.name.lower():
+ method = inner_data['M']
+ message = inner_data['A']
+- await self.__handlers[method](message)
++ await self.__handlers[method](inner_data)
+
+ connection.received += handle
+
+",signalr_aio/hubs/_hub.py,"ReplaceText(target='inner_data' @(43,50)->(43,57))","class HubClient(object):
+ if hub.lower() == self.name.lower():
+ method = inner_data['M']
+ message = inner_data['A']
+ await self.__handlers[method](message)
+
+ connection.received += handle
+ ","class HubClient(object):
+ if hub.lower() == self.name.lower():
+ method = inner_data['M']
+ message = inner_data['A']
+ await self.__handlers[method](inner_data)
+
+ connection.received += handle
+ "
+1959,https://:@github.com/slazarov/python-signalr-client.git,afdb4f05445acdfa4b1c9dfbbfccf5fb990cd6b0,"@@ -40,7 +40,7 @@ class HubClient(object):
+ if hub.lower() == self.name.lower():
+ method = inner_data['M']
+ message = inner_data['A']
+- await self.__handlers[method](inner_data)
++ await self.__handlers[method](message)
+
+ connection.received += handle
+
+",signalr_aio/hubs/_hub.py,"ReplaceText(target='message' @(43,50)->(43,60))","class HubClient(object):
+ if hub.lower() == self.name.lower():
+ method = inner_data['M']
+ message = inner_data['A']
+ await self.__handlers[method](inner_data)
+
+ connection.received += handle
+ ","class HubClient(object):
+ if hub.lower() == self.name.lower():
+ method = inner_data['M']
+ message = inner_data['A']
+ await self.__handlers[method](message)
+
+ connection.received += handle
+ "
+1960,https://:@gitlab.com/nsbl/nsbl.git,d853aa6323d0ba9f14cd25ae8f76b67b8376d422,"@@ -232,7 +232,7 @@ class NsblTasklist(Frklist):
+ elif res_type == ""ansible-tasklist"":
+
+ tasklists = res_urls
+- if isinstance(tasklist, string_types):
++ if isinstance(tasklists, string_types):
+ tasklists = [tasklists]
+
+ for tl_name in tasklists:
+",src/nsbl/nsbl_tasklist.py,"ReplaceText(target='tasklists' @(235,34)->(235,42))","class NsblTasklist(Frklist):
+ elif res_type == ""ansible-tasklist"":
+
+ tasklists = res_urls
+ if isinstance(tasklist, string_types):
+ tasklists = [tasklists]
+
+ for tl_name in tasklists:","class NsblTasklist(Frklist):
+ elif res_type == ""ansible-tasklist"":
+
+ tasklists = res_urls
+ if isinstance(tasklists, string_types):
+ tasklists = [tasklists]
+
+ for tl_name in tasklists:"
+1961,https://:@github.com/vishalsubbiah/darkchess.git,399c8bde5e12f905a47ee06c6a4ec8297e57cf96,"@@ -14,7 +14,7 @@ class Board(object):
+
+ def __init__(self, starting_board=None):
+ self.board = np.empty((8,8),dtype=Piece)
+- if starting_board is not None:
++ if starting_board is None:
+ self._start_pos()
+ else:
+ self.board = starting_board
+",src/board.py,"ReplaceText(target=' is ' @(17,25)->(17,33))","class Board(object):
+
+ def __init__(self, starting_board=None):
+ self.board = np.empty((8,8),dtype=Piece)
+ if starting_board is not None:
+ self._start_pos()
+ else:
+ self.board = starting_board","class Board(object):
+
+ def __init__(self, starting_board=None):
+ self.board = np.empty((8,8),dtype=Piece)
+ if starting_board is None:
+ self._start_pos()
+ else:
+ self.board = starting_board"
+1962,https://:@github.com/dongkai1993/social-core.git,d1d23e7e3cf4364c0d35289290b27787b84f5211,"@@ -50,7 +50,7 @@ def sanitize_redirect(host, redirect_to):
+ """"""
+ # Quick sanity check.
+ if not redirect_to or \
+- not isinstance(redirect_to, six.string_types) and \
++ not isinstance(redirect_to, six.string_types) or \
+ getattr(redirect_to, 'decode', None) and \
+ not isinstance(redirect_to.decode(), six.string_types):
+ return None
+",social/utils.py,"ReplaceText(target='or' @(53,53)->(53,56))","def sanitize_redirect(host, redirect_to):
+ """"""
+ # Quick sanity check.
+ if not redirect_to or \
+ not isinstance(redirect_to, six.string_types) and \
+ getattr(redirect_to, 'decode', None) and \
+ not isinstance(redirect_to.decode(), six.string_types):
+ return None","def sanitize_redirect(host, redirect_to):
+ """"""
+ # Quick sanity check.
+ if not redirect_to or \
+ not isinstance(redirect_to, six.string_types) or \
+ getattr(redirect_to, 'decode', None) and \
+ not isinstance(redirect_to.decode(), six.string_types):
+ return None"
+1963,https://:@github.com/dongkai1993/social-core.git,7d0628e7a756526b50449435eb02b2806e815755,"@@ -132,7 +132,7 @@ def partial_pipeline_data(strategy, user, *args, **kwargs):
+ kwargs.setdefault('user', user)
+ kwargs.setdefault('request', strategy.request)
+ kwargs.update(xkwargs)
+- return idx, backend, xargs, xkwargs
++ return idx, backend, xargs, kwargs
+
+
+ def build_absolute_uri(host_url, path=None):
+",social/utils.py,"ReplaceText(target='kwargs' @(135,36)->(135,43))","def partial_pipeline_data(strategy, user, *args, **kwargs):
+ kwargs.setdefault('user', user)
+ kwargs.setdefault('request', strategy.request)
+ kwargs.update(xkwargs)
+ return idx, backend, xargs, xkwargs
+
+
+ def build_absolute_uri(host_url, path=None):","def partial_pipeline_data(strategy, user, *args, **kwargs):
+ kwargs.setdefault('user', user)
+ kwargs.setdefault('request', strategy.request)
+ kwargs.update(xkwargs)
+ return idx, backend, xargs, kwargs
+
+
+ def build_absolute_uri(host_url, path=None):"
+1964,https://:@github.com/dongkai1993/social-core.git,d53529b57f0a4992889ad490e5314a2244155afa,"@@ -27,7 +27,7 @@ class SocialAuthExceptionMiddleware(object):
+ return
+
+ if isinstance(exception, SocialAuthBaseException):
+- backend_name = strategy.backend.name
++ backend_name = request.backend.name
+ message = self.get_message(request, exception)
+ url = self.get_redirect_uri(request, exception)
+ try:
+",social/apps/django_app/middleware.py,"ReplaceText(target='request' @(30,27)->(30,35))","class SocialAuthExceptionMiddleware(object):
+ return
+
+ if isinstance(exception, SocialAuthBaseException):
+ backend_name = strategy.backend.name
+ message = self.get_message(request, exception)
+ url = self.get_redirect_uri(request, exception)
+ try:","class SocialAuthExceptionMiddleware(object):
+ return
+
+ if isinstance(exception, SocialAuthBaseException):
+ backend_name = request.backend.name
+ message = self.get_message(request, exception)
+ url = self.get_redirect_uri(request, exception)
+ try:"
+1965,https://:@github.com/barseghyanartur/django-dummy-thumbnails.git,a97e0e6a75b3408484b736c541794e489b436f2a,"@@ -27,7 +27,7 @@ def get_setting(setting, override=None):
+ if hasattr(settings, attr_name):
+ value = getattr(settings, attr_name)
+ else:
+- if hasattr(defaults, attr_name):
++ if hasattr(defaults, setting):
+ value = getattr(defaults, setting)
+ else:
+ return override
+",src/dummy_thumbnails/conf.py,"ReplaceText(target='setting' @(30,29)->(30,38))","def get_setting(setting, override=None):
+ if hasattr(settings, attr_name):
+ value = getattr(settings, attr_name)
+ else:
+ if hasattr(defaults, attr_name):
+ value = getattr(defaults, setting)
+ else:
+ return override","def get_setting(setting, override=None):
+ if hasattr(settings, attr_name):
+ value = getattr(settings, attr_name)
+ else:
+ if hasattr(defaults, setting):
+ value = getattr(defaults, setting)
+ else:
+ return override"
+1966,https://:@github.com/phil1425/jupyter-pc.git,d96265319699f32e575280623e0b67ec588214d6,"@@ -48,7 +48,7 @@ def fit(data_x, data_y, sigma_x=None, sigma_y=None, func=None, beta=[1., 0.], *a
+
+ if type(data_x[0]) in ucvar:
+ values_x = [d.n for d in data_x]
+- sigma_x = [d.s if d.s!=0 else 1e-5 for d in data_y]
++ sigma_x = [d.s if d.s!=0 else 1e-5 for d in data_x]
+ elif type(data_x[0]) in [float, int]:
+ values_x = data_x
+
+",jupyterpc/jupyterpc.py,"ReplaceText(target='data_x' @(51,52)->(51,58))","def fit(data_x, data_y, sigma_x=None, sigma_y=None, func=None, beta=[1., 0.], *a
+
+ if type(data_x[0]) in ucvar:
+ values_x = [d.n for d in data_x]
+ sigma_x = [d.s if d.s!=0 else 1e-5 for d in data_y]
+ elif type(data_x[0]) in [float, int]:
+ values_x = data_x
+ ","def fit(data_x, data_y, sigma_x=None, sigma_y=None, func=None, beta=[1., 0.], *a
+
+ if type(data_x[0]) in ucvar:
+ values_x = [d.n for d in data_x]
+ sigma_x = [d.s if d.s!=0 else 1e-5 for d in data_x]
+ elif type(data_x[0]) in [float, int]:
+ values_x = data_x
+ "
+1967,https://:@github.com/mrshu/python-imhdsk-api.git,bbd3b584f1ed575ec2cb6493e4e99de22038b8bf,"@@ -93,6 +93,6 @@ def routes(start, dest, city='ba'):
+
+ route.begin_time = route.drives[0].begin_time
+ route.end_time = route.drives[-1].end_time
+- route.append(route)
++ routes.append(route)
+
+ return routes
+",imhdsk/__init__.py,"ReplaceText(target='routes' @(96,8)->(96,13))","def routes(start, dest, city='ba'):
+
+ route.begin_time = route.drives[0].begin_time
+ route.end_time = route.drives[-1].end_time
+ route.append(route)
+
+ return routes","def routes(start, dest, city='ba'):
+
+ route.begin_time = route.drives[0].begin_time
+ route.end_time = route.drives[-1].end_time
+ routes.append(route)
+
+ return routes"
+1968,https://:@github.com/juliusvonkohout/sparkmagic.git,54804b9adb02f02e5fccca8c21bcfd390426098e,"@@ -50,7 +50,7 @@ class UserCommandParser(object):
+
+ # When no magic, add run command
+ if not first_line.startswith(""%""):
+- first_line = ""%{} {}"".format(UserCommandParser.run_command, code)
++ first_line = ""%{} {}"".format(UserCommandParser.run_command, first_line)
+
+ # Remove percentage sign
+ first_line = first_line[1:]
+",remotespark/wrapperkernel/usercommandparser.py,"ReplaceText(target='first_line' @(53,72)->(53,76))","class UserCommandParser(object):
+
+ # When no magic, add run command
+ if not first_line.startswith(""%""):
+ first_line = ""%{} {}"".format(UserCommandParser.run_command, code)
+
+ # Remove percentage sign
+ first_line = first_line[1:]","class UserCommandParser(object):
+
+ # When no magic, add run command
+ if not first_line.startswith(""%""):
+ first_line = ""%{} {}"".format(UserCommandParser.run_command, first_line)
+
+ # Remove percentage sign
+ first_line = first_line[1:]"
+1969,https://:@github.com/morinted/plover_layout_display.git,8f071445dd2da69bfec2f5caf184627e713fd395,"@@ -58,7 +58,7 @@ class LayoutDisplayView(QGraphicsView):
+ if key.label:
+ label = QGraphicsTextItem(key.label)
+ label.setFont(font)
+- label.setDefaultTextColor(QColor(steno_layout.font_color))
++ label.setDefaultTextColor(QColor(key.font_color))
+
+ label_rect = label.boundingRect()
+ label_rect.moveCenter(path.boundingRect().center())
+",layout_display/layout_graphics.py,"ReplaceText(target='key' @(61,49)->(61,61))","class LayoutDisplayView(QGraphicsView):
+ if key.label:
+ label = QGraphicsTextItem(key.label)
+ label.setFont(font)
+ label.setDefaultTextColor(QColor(steno_layout.font_color))
+
+ label_rect = label.boundingRect()
+ label_rect.moveCenter(path.boundingRect().center())","class LayoutDisplayView(QGraphicsView):
+ if key.label:
+ label = QGraphicsTextItem(key.label)
+ label.setFont(font)
+ label.setDefaultTextColor(QColor(key.font_color))
+
+ label_rect = label.boundingRect()
+ label_rect.moveCenter(path.boundingRect().center())"
+1970,https://:@github.com/JulienPeloton/s4cmb.git,c4533367bf725c8486dc2140f841a8db649887f4,"@@ -445,7 +445,7 @@ class HealpixFitsMap():
+ alm = hp.map2alm([self.I,self.Q,self.U], self.lmax)
+ Elm=alm[1]
+ Blm=alm[2]
+- lmax=hp.Alm.getlmax(alm.size)
++ lmax=hp.Alm.getlmax(Elm.size)
+ if 'P1' in self.derivatives_type:
+ out = alm2map_spin_der1([Elm,Blm], self.nside_in, 2)
+ self.dQdt =out[1][0]
+",s4cmb/input_sky.py,"ReplaceText(target='Elm' @(448,28)->(448,31))","class HealpixFitsMap():
+ alm = hp.map2alm([self.I,self.Q,self.U], self.lmax)
+ Elm=alm[1]
+ Blm=alm[2]
+ lmax=hp.Alm.getlmax(alm.size)
+ if 'P1' in self.derivatives_type:
+ out = alm2map_spin_der1([Elm,Blm], self.nside_in, 2)
+ self.dQdt =out[1][0]","class HealpixFitsMap():
+ alm = hp.map2alm([self.I,self.Q,self.U], self.lmax)
+ Elm=alm[1]
+ Blm=alm[2]
+ lmax=hp.Alm.getlmax(Elm.size)
+ if 'P1' in self.derivatives_type:
+ out = alm2map_spin_der1([Elm,Blm], self.nside_in, 2)
+ self.dQdt =out[1][0]"
+1971,https://:@github.com/tjstretchalot/pympanim.git,ac45774fcbc0532095c17be74fdabe8186879ed6,"@@ -42,7 +42,7 @@ def find_child(ends_arr: typing.List[float],
+ last = 0
+ for i, etime in enumerate(ends_arr):
+ if time < etime:
+- return i, etime - last
++ return i, time - last
+ last = etime
+ if time == last:
+ return len(ends_arr) - 1, 0
+",pympanim/utils.py,"ReplaceText(target='time' @(45,22)->(45,27))","def find_child(ends_arr: typing.List[float],
+ last = 0
+ for i, etime in enumerate(ends_arr):
+ if time < etime:
+ return i, etime - last
+ last = etime
+ if time == last:
+ return len(ends_arr) - 1, 0","def find_child(ends_arr: typing.List[float],
+ last = 0
+ for i, etime in enumerate(ends_arr):
+ if time < etime:
+ return i, time - last
+ last = etime
+ if time == last:
+ return len(ends_arr) - 1, 0"
+1972,https://:@github.com/j-walker23/cattrs.git,416f032481f9eca1867a85a0efa989595d7e44bf,"@@ -347,7 +347,7 @@ class Converter(object):
+ # Check the union registry first.
+ handler = self._union_registry.get(union)
+ if handler is not None:
+- return handler(union, obj)
++ return handler(obj, union)
+
+ # Unions with NoneType in them are basically optionals.
+ union_params = union.__args__
+",cattr/converters.py,"ArgSwap(idxs=0<->1 @(350,19)->(350,26))","class Converter(object):
+ # Check the union registry first.
+ handler = self._union_registry.get(union)
+ if handler is not None:
+ return handler(union, obj)
+
+ # Unions with NoneType in them are basically optionals.
+ union_params = union.__args__","class Converter(object):
+ # Check the union registry first.
+ handler = self._union_registry.get(union)
+ if handler is not None:
+ return handler(obj, union)
+
+ # Unions with NoneType in them are basically optionals.
+ union_params = union.__args__"
+1973,https://:@github.com/mitchnegus/pyleiades.git,85a44d967870cd395675d594ea56f1d0a18748e5,"@@ -42,7 +42,7 @@ class EClass:
+ data = load_dataset(dataset_date=data_date,dataset_type=stat_type)
+
+ # Isolate this energy's data, separate frequencies, and format the data
+- self.E_data = self._isolate_energy(data,E_code)
++ self.E_data = self._isolate_energy(E_code,data)
+ self.monthly_data, self.yearly_data = self._sep_freqs(self.E_data)
+ for data_df in self.monthly_data,self.yearly_data:
+ data_df.set_index('Date_code',inplace=True)
+",main/eclass.py,"ArgSwap(idxs=0<->1 @(45,22)->(45,42))","class EClass:
+ data = load_dataset(dataset_date=data_date,dataset_type=stat_type)
+
+ # Isolate this energy's data, separate frequencies, and format the data
+ self.E_data = self._isolate_energy(data,E_code)
+ self.monthly_data, self.yearly_data = self._sep_freqs(self.E_data)
+ for data_df in self.monthly_data,self.yearly_data:
+ data_df.set_index('Date_code',inplace=True)","class EClass:
+ data = load_dataset(dataset_date=data_date,dataset_type=stat_type)
+
+ # Isolate this energy's data, separate frequencies, and format the data
+ self.E_data = self._isolate_energy(E_code,data)
+ self.monthly_data, self.yearly_data = self._sep_freqs(self.E_data)
+ for data_df in self.monthly_data,self.yearly_data:
+ data_df.set_index('Date_code',inplace=True)"
+1974,https://:@github.com/vgalisson/pySankey.git,44c01d55c6132a003adae938132f9f5bcc4e6b32,"@@ -158,7 +158,7 @@ def sankey(
+ if len(rightLabels) == 0:
+ rightLabels = pd.Series(dataFrame.right.unique()).unique()
+ else:
+- check_data_matches_labels(leftLabels, dataFrame[""right""], ""right"")
++ check_data_matches_labels(rightLabels, dataFrame[""right""], ""right"")
+ # If no colorDict given, make one
+ if colorDict is None:
+ colorDict = {}
+",pysankey/sankey.py,"ReplaceText(target='rightLabels' @(161,34)->(161,44))","def sankey(
+ if len(rightLabels) == 0:
+ rightLabels = pd.Series(dataFrame.right.unique()).unique()
+ else:
+ check_data_matches_labels(leftLabels, dataFrame[""right""], ""right"")
+ # If no colorDict given, make one
+ if colorDict is None:
+ colorDict = {}","def sankey(
+ if len(rightLabels) == 0:
+ rightLabels = pd.Series(dataFrame.right.unique()).unique()
+ else:
+ check_data_matches_labels(rightLabels, dataFrame[""right""], ""right"")
+ # If no colorDict given, make one
+ if colorDict is None:
+ colorDict = {}"
+1975,https://:@github.com/kshitij10496/lexico.git,a47f45857e2c389833e3f4d3f151b44973520714,"@@ -52,7 +52,7 @@ def handle_word(word):
+ else:
+ word_object = fetch_word(word)
+ click.echo_via_pager(word_object.stringify())
+- word_save_status = save_word(word)
++ word_save_status = save_word(word_object)
+ if word_save_status:
+ click.echo('{} has been added to your personal dictionary.'.format(word))
+ else:
+",familiarize/cli.py,"ReplaceText(target='word_object' @(55,37)->(55,41))","def handle_word(word):
+ else:
+ word_object = fetch_word(word)
+ click.echo_via_pager(word_object.stringify())
+ word_save_status = save_word(word)
+ if word_save_status:
+ click.echo('{} has been added to your personal dictionary.'.format(word))
+ else:","def handle_word(word):
+ else:
+ word_object = fetch_word(word)
+ click.echo_via_pager(word_object.stringify())
+ word_save_status = save_word(word_object)
+ if word_save_status:
+ click.echo('{} has been added to your personal dictionary.'.format(word))
+ else:"
+1976,https://:@github.com/speedcell4/aku.git,b96231d5ae8da4987bdf350ab8b8b4bbcf5f8059,"@@ -19,7 +19,7 @@ class Tp(object, metaclass=ABCMeta):
+ origin = get_origin(tp)
+
+ if origin is None and args == ():
+- return PrimitiveTp(origin)
++ return PrimitiveTp(tp)
+ if origin is list and len(args) == 1:
+ return ListTp(origin, cls[args[0]])
+ if origin is tuple:
+",aku/tp.py,"ReplaceText(target='tp' @(22,31)->(22,37))","class Tp(object, metaclass=ABCMeta):
+ origin = get_origin(tp)
+
+ if origin is None and args == ():
+ return PrimitiveTp(origin)
+ if origin is list and len(args) == 1:
+ return ListTp(origin, cls[args[0]])
+ if origin is tuple:","class Tp(object, metaclass=ABCMeta):
+ origin = get_origin(tp)
+
+ if origin is None and args == ():
+ return PrimitiveTp(tp)
+ if origin is list and len(args) == 1:
+ return ListTp(origin, cls[args[0]])
+ if origin is tuple:"
+1977,https://:@github.com/rembish/cfb.git,220ec866dbbae13cebbff3e5ba2da95cf433ef32,"@@ -76,7 +76,7 @@ class CfbIO(FileIO, MaybeDefected, ByteHelpers):
+ sector_size = self.header.sector_size // 4
+ sector = self.header.minifat_sector_start
+
+- while sector != ENDOFCHAIN and (current + 1) * sector_size <= current:
++ while sector != ENDOFCHAIN and (position + 1) * sector_size <= current:
+ sector = self.next_fat(sector)
+ position += 1
+
+",cfb/__init__.py,"ReplaceText(target='position' @(79,40)->(79,47))","class CfbIO(FileIO, MaybeDefected, ByteHelpers):
+ sector_size = self.header.sector_size // 4
+ sector = self.header.minifat_sector_start
+
+ while sector != ENDOFCHAIN and (current + 1) * sector_size <= current:
+ sector = self.next_fat(sector)
+ position += 1
+ ","class CfbIO(FileIO, MaybeDefected, ByteHelpers):
+ sector_size = self.header.sector_size // 4
+ sector = self.header.minifat_sector_start
+
+ while sector != ENDOFCHAIN and (position + 1) * sector_size <= current:
+ sector = self.next_fat(sector)
+ position += 1
+ "
+1978,https://:@github.com/acgt-tax-consultants/orchard.git,05d5b3ca4b5b6eaf6da380b8d5655b6f8d10342c,"@@ -58,7 +58,7 @@ def build(link_file_path, config_file_path, output):
+ try:
+ link_file = LinkFile(link_file_path)
+ config_file = ConfigFile(config_file_path, True)
+- if validate(link_file_path, config_file_path):
++ if not validate(link_file_path, config_file_path):
+ click.secho('Invalid configuration file.', fg='red', err=True)
+ click.get_current_context().exit(1)
+
+",orchard/cli.py,"ReplaceText(target='not ' @(61,11)->(61,11))","def build(link_file_path, config_file_path, output):
+ try:
+ link_file = LinkFile(link_file_path)
+ config_file = ConfigFile(config_file_path, True)
+ if validate(link_file_path, config_file_path):
+ click.secho('Invalid configuration file.', fg='red', err=True)
+ click.get_current_context().exit(1)
+ ","def build(link_file_path, config_file_path, output):
+ try:
+ link_file = LinkFile(link_file_path)
+ config_file = ConfigFile(config_file_path, True)
+ if not validate(link_file_path, config_file_path):
+ click.secho('Invalid configuration file.', fg='red', err=True)
+ click.get_current_context().exit(1)
+ "
+1979,https://:@github.com/ostdotcom/ost-kyc-sdk-python.git,c348eb67f5beb94e238746b6c52987c10eb53542,"@@ -54,7 +54,7 @@ class HTTPHelper:
+ #
+ def verify_required(self):
+ if self.urlparse()(self.api_base_url).scheme == ""http"":
+- return True
++ return False
+ return True
+
+ #
+",ost_kyc_sdk_python/util/http_helper.py,"ReplaceText(target='False' @(57,19)->(57,23))","class HTTPHelper:
+ #
+ def verify_required(self):
+ if self.urlparse()(self.api_base_url).scheme == ""http"":
+ return True
+ return True
+
+ # ","class HTTPHelper:
+ #
+ def verify_required(self):
+ if self.urlparse()(self.api_base_url).scheme == ""http"":
+ return False
+ return True
+
+ # "
+1980,https://:@github.com/IBM/yaps.git,43d298bdbf36cb2f1dde75a4d85a4a3ee66aff7a,"@@ -516,7 +516,7 @@ class Slice(Expression):
+ # is this an operator precedence issue?
+ if self.lower:
+ self.to_stan_prec(self.lower, acc, indent)
+- if self.lower and self.upper:
++ if self.lower or self.upper:
+ acc += self.mkString("":"")
+ if self.upper:
+ self.to_stan_prec(self.upper, acc, indent)
+",yaps/ir.py,"ReplaceText(target='or' @(519,22)->(519,25))","class Slice(Expression):
+ # is this an operator precedence issue?
+ if self.lower:
+ self.to_stan_prec(self.lower, acc, indent)
+ if self.lower and self.upper:
+ acc += self.mkString("":"")
+ if self.upper:
+ self.to_stan_prec(self.upper, acc, indent)","class Slice(Expression):
+ # is this an operator precedence issue?
+ if self.lower:
+ self.to_stan_prec(self.lower, acc, indent)
+ if self.lower or self.upper:
+ acc += self.mkString("":"")
+ if self.upper:
+ self.to_stan_prec(self.upper, acc, indent)"
+1981,https://:@github.com/larsyunker/PythoMS.git,9d393ed6083fe08e3f58439c99cedd084571df2f,"@@ -552,7 +552,7 @@ def estimated_exact_mass(
+ """"""
+ # narrow range to that of the isotope pattern
+ l = bisect_left(x, simmin - lookwithin)
+- r = bisect_right(x, simmax - lookwithin)
++ r = bisect_right(x, simmax + lookwithin)
+ locmax = max(y[l:r]) # find local max in that range
+ for ind, val in enumerate(y):
+ if val == locmax: # if the y-value equals the local max
+",pythoms/tome.py,"ReplaceText(target='+' @(555,31)->(555,32))","def estimated_exact_mass(
+ """"""
+ # narrow range to that of the isotope pattern
+ l = bisect_left(x, simmin - lookwithin)
+ r = bisect_right(x, simmax - lookwithin)
+ locmax = max(y[l:r]) # find local max in that range
+ for ind, val in enumerate(y):
+ if val == locmax: # if the y-value equals the local max","def estimated_exact_mass(
+ """"""
+ # narrow range to that of the isotope pattern
+ l = bisect_left(x, simmin - lookwithin)
+ r = bisect_right(x, simmax + lookwithin)
+ locmax = max(y[l:r]) # find local max in that range
+ for ind, val in enumerate(y):
+ if val == locmax: # if the y-value equals the local max"
+1982,https://:@github.com/kcl-tscm/mff.git,0c7f60c26344c4a68f8e06b518e3ef7b0b11c834,"@@ -613,7 +613,7 @@ class Sampling(object):
+ SMAE = np.std(np.sqrt(np.sum(np.square(error), axis=1)))
+ RMSE = np.sqrt(np.mean((error) ** 2))
+ else:
+- m.fit_energy(train_confs, train_forces)
++ m.fit_energy(train_confs, train_energy)
+ y_hat = m.predict_energy(self.x)
+ error = y_hat - self.y
+ MAE = np.mean(np.abs(error))
+",mff/advanced_sampling.py,"ReplaceText(target='train_energy' @(616,38)->(616,50))","class Sampling(object):
+ SMAE = np.std(np.sqrt(np.sum(np.square(error), axis=1)))
+ RMSE = np.sqrt(np.mean((error) ** 2))
+ else:
+ m.fit_energy(train_confs, train_forces)
+ y_hat = m.predict_energy(self.x)
+ error = y_hat - self.y
+ MAE = np.mean(np.abs(error))","class Sampling(object):
+ SMAE = np.std(np.sqrt(np.sum(np.square(error), axis=1)))
+ RMSE = np.sqrt(np.mean((error) ** 2))
+ else:
+ m.fit_energy(train_confs, train_energy)
+ y_hat = m.predict_energy(self.x)
+ error = y_hat - self.y
+ MAE = np.mean(np.abs(error))"
+1983,https://:@github.com/kcl-tscm/mff.git,0dd4e341b2fb23bb8b39a267ccb32728c841650f,"@@ -39,7 +39,7 @@ def eam_descriptor(dist, norm, rc, alpha, r0):
+ try:
+ dqdrij = -1/(2*q) * (dq1*q2 + q1*dq2)
+ except ZeroDivisionError:
+- dqdrij = np.zeros(len(q))
++ dqdrij = np.zeros(len(q1))
+ dqdr = -dqdrij[:, None]*norm
+ return q, dqdr
+
+",mff/calculators.py,"ReplaceText(target='q1' @(42,30)->(42,31))","def eam_descriptor(dist, norm, rc, alpha, r0):
+ try:
+ dqdrij = -1/(2*q) * (dq1*q2 + q1*dq2)
+ except ZeroDivisionError:
+ dqdrij = np.zeros(len(q))
+ dqdr = -dqdrij[:, None]*norm
+ return q, dqdr
+ ","def eam_descriptor(dist, norm, rc, alpha, r0):
+ try:
+ dqdrij = -1/(2*q) * (dq1*q2 + q1*dq2)
+ except ZeroDivisionError:
+ dqdrij = np.zeros(len(q1))
+ dqdr = -dqdrij[:, None]*norm
+ return q, dqdr
+ "
+1984,https://:@github.com/mlavin/django-hilbert.git,f550bd0292f4d0e3a32a1da894d7f70711e5ad67,"@@ -38,7 +38,7 @@ class SSLRedirectMiddleware(object):
+ urls = tuple([re.compile(url) for url in getattr(settings, 'SSL_PATTERNS', [])])
+ secure = any([url.search(request.path) for url in urls])
+ if request.is_secure():
+- if not secure and not getattr(request, 'keep_secure', False):
++ if secure and not getattr(request, 'keep_secure', False):
+ if getattr(settings, 'SSL_WHITELIST', False):
+ # Redirect off SSL
+ return _redirect(request, False)
+",hilbert/middleware.py,"ReplaceText(target='' @(41,15)->(41,19))","class SSLRedirectMiddleware(object):
+ urls = tuple([re.compile(url) for url in getattr(settings, 'SSL_PATTERNS', [])])
+ secure = any([url.search(request.path) for url in urls])
+ if request.is_secure():
+ if not secure and not getattr(request, 'keep_secure', False):
+ if getattr(settings, 'SSL_WHITELIST', False):
+ # Redirect off SSL
+ return _redirect(request, False)","class SSLRedirectMiddleware(object):
+ urls = tuple([re.compile(url) for url in getattr(settings, 'SSL_PATTERNS', [])])
+ secure = any([url.search(request.path) for url in urls])
+ if request.is_secure():
+ if secure and not getattr(request, 'keep_secure', False):
+ if getattr(settings, 'SSL_WHITELIST', False):
+ # Redirect off SSL
+ return _redirect(request, False)"
+1985,https://:@github.com/jbaiter/zotero-cli.git,4e1f926aa016e5a081609e24b8498d94139949ad,"@@ -45,7 +45,7 @@ def find_storage_directories():
+ if zotero_dir.exists():
+ candidates.append(zotero_dir.iterdir())
+ zotero5_dir = home_dir/""Zotero/storage""
+- if zotero_dir.exists():
++ if zotero5_dir.exists():
+ yield ('default', zotero5_dir)
+ candidate_iter = itertools.chain.from_iterable(candidates)
+ for fpath in candidate_iter:
+",zotero_cli/cli.py,"ReplaceText(target='zotero5_dir' @(48,7)->(48,17))","def find_storage_directories():
+ if zotero_dir.exists():
+ candidates.append(zotero_dir.iterdir())
+ zotero5_dir = home_dir/""Zotero/storage""
+ if zotero_dir.exists():
+ yield ('default', zotero5_dir)
+ candidate_iter = itertools.chain.from_iterable(candidates)
+ for fpath in candidate_iter:","def find_storage_directories():
+ if zotero_dir.exists():
+ candidates.append(zotero_dir.iterdir())
+ zotero5_dir = home_dir/""Zotero/storage""
+ if zotero5_dir.exists():
+ yield ('default', zotero5_dir)
+ candidate_iter = itertools.chain.from_iterable(candidates)
+ for fpath in candidate_iter:"
+1986,https://:@github.com/mjwen/kliff.git,6d15ef5257545fe7c716db02cc80a34120e93a04,"@@ -129,7 +129,7 @@ def get_descriptor():
+ desc_params['g5'] = [{'zeta': 1, 'lambda': -1, 'eta': 0.0001},
+ {'zeta': 2, 'lambda': 1, 'eta': 0.003}]
+
+- desc = SymmetryFunction(cutfunc, cutvalue, desc_params)
++ desc = SymmetryFunction(cutvalue, cutfunc, desc_params)
+
+ return desc
+
+",tests/descriptors/test_symmetry_function.py,"ArgSwap(idxs=0<->1 @(132,11)->(132,27))","def get_descriptor():
+ desc_params['g5'] = [{'zeta': 1, 'lambda': -1, 'eta': 0.0001},
+ {'zeta': 2, 'lambda': 1, 'eta': 0.003}]
+
+ desc = SymmetryFunction(cutfunc, cutvalue, desc_params)
+
+ return desc
+ ","def get_descriptor():
+ desc_params['g5'] = [{'zeta': 1, 'lambda': -1, 'eta': 0.0001},
+ {'zeta': 2, 'lambda': 1, 'eta': 0.003}]
+
+ desc = SymmetryFunction(cutvalue, cutfunc, desc_params)
+
+ return desc
+ "
+1987,https://:@github.com/wheeler-microfluidics/mpm.git,ce40cbc346ba0bbb0770d2ab71165d84b8c1ffaa,"@@ -441,7 +441,7 @@ def enable_plugin(plugin_name):
+ logger.debug('Plugin already enabled: `%s` -> `%s`', plugin_path_i,
+ plugin_link_path_i)
+ enabled_now[plugin_path_i.name] = False
+- return enabled_now if not singleton else singleton.values()[0]
++ return enabled_now if not singleton else enabled_now.values()[0]
+
+
+ def disable_plugin(plugin_name):
+",mpm/api.py,"ReplaceText(target='enabled_now' @(444,45)->(444,54))","def enable_plugin(plugin_name):
+ logger.debug('Plugin already enabled: `%s` -> `%s`', plugin_path_i,
+ plugin_link_path_i)
+ enabled_now[plugin_path_i.name] = False
+ return enabled_now if not singleton else singleton.values()[0]
+
+
+ def disable_plugin(plugin_name):","def enable_plugin(plugin_name):
+ logger.debug('Plugin already enabled: `%s` -> `%s`', plugin_path_i,
+ plugin_link_path_i)
+ enabled_now[plugin_path_i.name] = False
+ return enabled_now if not singleton else enabled_now.values()[0]
+
+
+ def disable_plugin(plugin_name):"
+1988,https://:@github.com/N2ITN/RPiViz.git,61199407198a9d674f7836b25da74a6956a93917,"@@ -46,4 +46,4 @@ def crop2face(pic, predictor):
+ clahe_crop = clahe_image[y1:y2, x1:x2]
+ #LBP_img = LBP.main(clahe_crop)
+ shape = predictor(clahe_crop, detections)
+- return shape, clahe_image
++ return shape, clahe_crop
+",raspiviz/identify.py,"ReplaceText(target='clahe_crop' @(49,22)->(49,33))","def crop2face(pic, predictor):
+ clahe_crop = clahe_image[y1:y2, x1:x2]
+ #LBP_img = LBP.main(clahe_crop)
+ shape = predictor(clahe_crop, detections)
+ return shape, clahe_image","def crop2face(pic, predictor):
+ clahe_crop = clahe_image[y1:y2, x1:x2]
+ #LBP_img = LBP.main(clahe_crop)
+ shape = predictor(clahe_crop, detections)
+ return shape, clahe_crop"
+1989,https://:@github.com/cctbx/cctbx_project.git,bf735aeb2594c55e777037d8680cde1c45926f6d,"@@ -279,7 +279,7 @@ class table:
+ if (alt_row_name is None): continue
+ if (alt_row_name == path):
+ result.extend(row_objects)
+- elif (not path.startswith(alt_row_name+""."")):
++ elif (path.startswith(alt_row_name+""."")):
+ for row_object in row_objects:
+ result.extend(row_object.get(path=path[len(alt_row_name)+1:]))
+ return result
+",iotbx/iotbx/parameters/__init__.py,"ReplaceText(target='' @(282,14)->(282,18))","class table:
+ if (alt_row_name is None): continue
+ if (alt_row_name == path):
+ result.extend(row_objects)
+ elif (not path.startswith(alt_row_name+""."")):
+ for row_object in row_objects:
+ result.extend(row_object.get(path=path[len(alt_row_name)+1:]))
+ return result","class table:
+ if (alt_row_name is None): continue
+ if (alt_row_name == path):
+ result.extend(row_objects)
+ elif (path.startswith(alt_row_name+""."")):
+ for row_object in row_objects:
+ result.extend(row_object.get(path=path[len(alt_row_name)+1:]))
+ return result"
+1990,https://:@github.com/cctbx/cctbx_project.git,d2b0c38feb91a6d3ca5d23614cc7d67daff71bd6,"@@ -25,7 +25,7 @@ cns_dna_rna_residue_names = {
+ }
+
+ mon_lib_dna_rna_cif = [""AD"", ""AR"", ""CD"", ""CR"", ""GD"", ""GR"", ""TD"", ""UR""]
+-if (""set"" not in __builtins__):
++if (""set"" in __builtins__):
+ mon_lib_dna_rna_cif = set(mon_lib_dna_rna_cif)
+
+ rna_dna_reference_residue_names = {
+",iotbx/iotbx/pdb/__init__.py,"ReplaceText(target=' in ' @(28,9)->(28,17))","cns_dna_rna_residue_names = {
+ }
+
+ mon_lib_dna_rna_cif = [""AD"", ""AR"", ""CD"", ""CR"", ""GD"", ""GR"", ""TD"", ""UR""]
+ if (""set"" not in __builtins__):
+ mon_lib_dna_rna_cif = set(mon_lib_dna_rna_cif)
+
+ rna_dna_reference_residue_names = {","cns_dna_rna_residue_names = {
+ }
+
+ mon_lib_dna_rna_cif = [""AD"", ""AR"", ""CD"", ""CR"", ""GD"", ""GR"", ""TD"", ""UR""]
+ if (""set"" in __builtins__):
+ mon_lib_dna_rna_cif = set(mon_lib_dna_rna_cif)
+
+ rna_dna_reference_residue_names = {"
+1991,https://:@github.com/cctbx/cctbx_project.git,bb89e67604a536127da9b373ddac969a43c21077,"@@ -568,7 +568,7 @@ def input(
+ lines=None,
+ pdb_id=None):
+ if (pdb_id is not None):
+- assert file_name is not None
++ assert file_name is None
+ file_name = ent_path_local_mirror(pdb_id=pdb_id)
+ if (file_name is not None):
+ return ext.input(
+",iotbx/pdb/__init__.py,"ReplaceText(target=' is ' @(571,20)->(571,28))","def input(
+ lines=None,
+ pdb_id=None):
+ if (pdb_id is not None):
+ assert file_name is not None
+ file_name = ent_path_local_mirror(pdb_id=pdb_id)
+ if (file_name is not None):
+ return ext.input(","def input(
+ lines=None,
+ pdb_id=None):
+ if (pdb_id is not None):
+ assert file_name is None
+ file_name = ent_path_local_mirror(pdb_id=pdb_id)
+ if (file_name is not None):
+ return ext.input("
+1992,https://:@github.com/cctbx/cctbx_project.git,1f3ebf35ac25f18b43f5ce2454f898f4609e9e2e,"@@ -1218,7 +1218,7 @@ class _(boost.python.injector, pair_sym_table):
+ if (pair_count == 0):
+ print >> out, "" no neighbors""
+ pair_counts.append(pair_count)
+- return pair_count
++ return pair_counts
+
+ def number_of_pairs_involving_symmetry(self):
+ result = 0
+",cctbx/crystal/__init__.py,"ReplaceText(target='pair_counts' @(1221,11)->(1221,21))","class _(boost.python.injector, pair_sym_table):
+ if (pair_count == 0):
+ print >> out, "" no neighbors""
+ pair_counts.append(pair_count)
+ return pair_count
+
+ def number_of_pairs_involving_symmetry(self):
+ result = 0","class _(boost.python.injector, pair_sym_table):
+ if (pair_count == 0):
+ print >> out, "" no neighbors""
+ pair_counts.append(pair_count)
+ return pair_counts
+
+ def number_of_pairs_involving_symmetry(self):
+ result = 0"
+1993,https://:@github.com/cctbx/cctbx_project.git,5beb4735b28360b9f33f71020d3c1459330f4053,"@@ -50,7 +50,7 @@ class mod_hdf5(common_mode.common_mode_correction):
+
+ # If no detector distance is available set it to NaN, since
+ # Python's None is not permitted in HDF5
+- distance = cspad_tbx.env_distance(env, self.address, self._detz_offset)
++ distance = cspad_tbx.env_distance(self.address, env, self._detz_offset)
+ if distance is None:
+ distance = float('nan')
+
+",xfel/cxi/cspad_ana/mod_hdf5.py,"ArgSwap(idxs=0<->1 @(53,15)->(53,37))","class mod_hdf5(common_mode.common_mode_correction):
+
+ # If no detector distance is available set it to NaN, since
+ # Python's None is not permitted in HDF5
+ distance = cspad_tbx.env_distance(env, self.address, self._detz_offset)
+ if distance is None:
+ distance = float('nan')
+ ","class mod_hdf5(common_mode.common_mode_correction):
+
+ # If no detector distance is available set it to NaN, since
+ # Python's None is not permitted in HDF5
+ distance = cspad_tbx.env_distance(self.address, env, self._detz_offset)
+ if distance is None:
+ distance = float('nan')
+ "
+1994,https://:@github.com/cctbx/cctbx_project.git,5beb4735b28360b9f33f71020d3c1459330f4053,"@@ -76,7 +76,7 @@ class mod_param(object):
+ return
+
+ # XXX This hardcodes the address for the front detector!
+- detz = cspad_tbx.env_detz(env, 'CxiDs1-0|Cspad-0')
++ detz = cspad_tbx.env_detz('CxiDs1-0|Cspad-0', env)
+ if (detz is None):
+ self.m_no_detz += 1
+
+",xfel/cxi/cspad_ana/mod_param.py,"ArgSwap(idxs=0<->1 @(79,11)->(79,29))","class mod_param(object):
+ return
+
+ # XXX This hardcodes the address for the front detector!
+ detz = cspad_tbx.env_detz(env, 'CxiDs1-0|Cspad-0')
+ if (detz is None):
+ self.m_no_detz += 1
+ ","class mod_param(object):
+ return
+
+ # XXX This hardcodes the address for the front detector!
+ detz = cspad_tbx.env_detz('CxiDs1-0|Cspad-0', env)
+ if (detz is None):
+ self.m_no_detz += 1
+ "
+1995,https://:@github.com/cctbx/cctbx_project.git,5beb4735b28360b9f33f71020d3c1459330f4053,"@@ -342,7 +342,7 @@ class mod_view(common_mode.common_mode_correction):
+ # Get the distance for the detectors that should have it, and set
+ # it to NaN for those that should not.
+ if self.detector == 'CxiDs1' or self.detector == 'CxiDsd':
+- distance = cspad_tbx.env_distance(env, self.address, self._detz_offset)
++ distance = cspad_tbx.env_distance(self.address, env, self._detz_offset)
+ if distance is None:
+ self.nfail += 1
+ self.logger.warning(""event(): no distance, shot skipped"")
+",xfel/cxi/cspad_ana/mod_view.py,"ArgSwap(idxs=0<->1 @(345,17)->(345,39))","class mod_view(common_mode.common_mode_correction):
+ # Get the distance for the detectors that should have it, and set
+ # it to NaN for those that should not.
+ if self.detector == 'CxiDs1' or self.detector == 'CxiDsd':
+ distance = cspad_tbx.env_distance(env, self.address, self._detz_offset)
+ if distance is None:
+ self.nfail += 1
+ self.logger.warning(""event(): no distance, shot skipped"")","class mod_view(common_mode.common_mode_correction):
+ # Get the distance for the detectors that should have it, and set
+ # it to NaN for those that should not.
+ if self.detector == 'CxiDs1' or self.detector == 'CxiDsd':
+ distance = cspad_tbx.env_distance(self.address, env, self._detz_offset)
+ if distance is None:
+ self.nfail += 1
+ self.logger.warning(""event(): no distance, shot skipped"")"
+1996,https://:@github.com/cctbx/cctbx_project.git,f60ef549166e775043ee96a9d55ea7946e6042af,"@@ -1212,7 +1212,7 @@ def get_matching_atoms(chains_info,a_id,b_id,res_num_a,res_num_b,
+ a_altloc = chains_info[a_id].no_altloc.count(False) > 0
+ b_altloc = bool(chains_info[b_id].no_altloc)
+ if b_altloc:
+- b_altloc = chains_info[a_id].no_altloc.count(False) > 0
++ b_altloc = chains_info[b_id].no_altloc.count(False) > 0
+ test_altloc = a_altloc or b_altloc
+ #
+ res_num_a_updated = []
+",mmtbx/ncs/ncs_search.py,"ReplaceText(target='b_id' @(1215,27)->(1215,31))","def get_matching_atoms(chains_info,a_id,b_id,res_num_a,res_num_b,
+ a_altloc = chains_info[a_id].no_altloc.count(False) > 0
+ b_altloc = bool(chains_info[b_id].no_altloc)
+ if b_altloc:
+ b_altloc = chains_info[a_id].no_altloc.count(False) > 0
+ test_altloc = a_altloc or b_altloc
+ #
+ res_num_a_updated = []","def get_matching_atoms(chains_info,a_id,b_id,res_num_a,res_num_b,
+ a_altloc = chains_info[a_id].no_altloc.count(False) > 0
+ b_altloc = bool(chains_info[b_id].no_altloc)
+ if b_altloc:
+ b_altloc = chains_info[b_id].no_altloc.count(False) > 0
+ test_altloc = a_altloc or b_altloc
+ #
+ res_num_a_updated = []"
+1997,https://:@github.com/cctbx/cctbx_project.git,2621ef9d6d7a761b026f833837cf885945745986,"@@ -188,7 +188,7 @@ class torsion_ncs(object):
+ # and in another - MSE. They will be excluded without
+ # raising Sorry. They could matched, but it is difficult
+ # to figure out in this code how to make it happen.
+- not (resname1 in [""MET"", ""MSE""] and resname1 in [""MET"", ""MSE""])):
++ not (resname1 in [""MET"", ""MSE""] and resname2 in [""MET"", ""MSE""])):
+ msg = ""Error in matching procedure: matching ""
+ msg += ""'%s %s' and '%s %s'.\n"" % (
+ resname1, rg1.id_str(), resname2, rg2.id_str())
+",mmtbx/geometry_restraints/torsion_restraints/torsion_ncs.py,"ReplaceText(target='resname2' @(191,54)->(191,62))","class torsion_ncs(object):
+ # and in another - MSE. They will be excluded without
+ # raising Sorry. They could matched, but it is difficult
+ # to figure out in this code how to make it happen.
+ not (resname1 in [""MET"", ""MSE""] and resname1 in [""MET"", ""MSE""])):
+ msg = ""Error in matching procedure: matching ""
+ msg += ""'%s %s' and '%s %s'.\n"" % (
+ resname1, rg1.id_str(), resname2, rg2.id_str())","class torsion_ncs(object):
+ # and in another - MSE. They will be excluded without
+ # raising Sorry. They could matched, but it is difficult
+ # to figure out in this code how to make it happen.
+ not (resname1 in [""MET"", ""MSE""] and resname2 in [""MET"", ""MSE""])):
+ msg = ""Error in matching procedure: matching ""
+ msg += ""'%s %s' and '%s %s'.\n"" % (
+ resname1, rg1.id_str(), resname2, rg2.id_str())"
+1998,https://:@github.com/cctbx/cctbx_project.git,7b8295b84a75a33064f917be984d6017d53a3494,"@@ -795,7 +795,7 @@ class ResidualsPlotter(object):
+ reflections['xyzcal.px'] = reflections['xyzcal.px.%s'%dest]
+
+ if 'xyzobs.mm.value' not in reflections:
+- reflections.centroid_px_to_mm(detector)
++ reflections.centroid_px_to_mm(experiments)
+ reflections['difference_vector_norms'] = (reflections['xyzcal.mm']-reflections['xyzobs.mm.value']).norms()
+
+ n = len(reflections)
+",xfel/command_line/detector_residuals.py,"ReplaceText(target='experiments' @(798,36)->(798,44))","class ResidualsPlotter(object):
+ reflections['xyzcal.px'] = reflections['xyzcal.px.%s'%dest]
+
+ if 'xyzobs.mm.value' not in reflections:
+ reflections.centroid_px_to_mm(detector)
+ reflections['difference_vector_norms'] = (reflections['xyzcal.mm']-reflections['xyzobs.mm.value']).norms()
+
+ n = len(reflections)","class ResidualsPlotter(object):
+ reflections['xyzcal.px'] = reflections['xyzcal.px.%s'%dest]
+
+ if 'xyzobs.mm.value' not in reflections:
+ reflections.centroid_px_to_mm(experiments)
+ reflections['difference_vector_norms'] = (reflections['xyzcal.mm']-reflections['xyzobs.mm.value']).norms()
+
+ n = len(reflections)"
+1999,https://:@github.com/cctbx/cctbx_project.git,b2783566840ae3392e09171bcb4141e46e6481e5,"@@ -115,7 +115,7 @@ class reader(iotbx_shelx_ext.hklf_reader):
+ miller_set = miller.set(
+ crystal_symmetry=crystal_symmetry,
+ indices=self.indices(), anomalous_flag=anomalous)
+- if anomalous is not None:
++ if anomalous is None:
+ miller_set = miller_set.auto_anomalous()
+ miller_arrays = []
+ obs = (miller.array(
+",iotbx/shelx/hklf.py,"ReplaceText(target=' is ' @(118,16)->(118,24))","class reader(iotbx_shelx_ext.hklf_reader):
+ miller_set = miller.set(
+ crystal_symmetry=crystal_symmetry,
+ indices=self.indices(), anomalous_flag=anomalous)
+ if anomalous is not None:
+ miller_set = miller_set.auto_anomalous()
+ miller_arrays = []
+ obs = (miller.array(","class reader(iotbx_shelx_ext.hklf_reader):
+ miller_set = miller.set(
+ crystal_symmetry=crystal_symmetry,
+ indices=self.indices(), anomalous_flag=anomalous)
+ if anomalous is None:
+ miller_set = miller_set.auto_anomalous()
+ miller_arrays = []
+ obs = (miller.array("
+2000,https://:@github.com/cctbx/cctbx_project.git,0a50a4f43be57400f7aed41055b7ae401954724d,"@@ -189,7 +189,7 @@ def exercise():
+ pdb_inp1 = iotbx.pdb.input(source_info=None, lines=test_pdb)
+ pdb_inp2 = iotbx.pdb.input(source_info=None, lines=test_cif)
+ model1 = mmtbx.model.manager(pdb_inp1)
+- model2 = mmtbx.model.manager(pdb_inp1)
++ model2 = mmtbx.model.manager(pdb_inp2)
+ trans_obj1 = iotbx.ncs.input(hierarchy=model1.get_hierarchy())
+ trans_obj2 = iotbx.ncs.input(hierarchy=model2.get_hierarchy())
+
+",iotbx/pdb/tst_read_mtrix_records_from_cif.py,"ReplaceText(target='pdb_inp2' @(192,31)->(192,39))","def exercise():
+ pdb_inp1 = iotbx.pdb.input(source_info=None, lines=test_pdb)
+ pdb_inp2 = iotbx.pdb.input(source_info=None, lines=test_cif)
+ model1 = mmtbx.model.manager(pdb_inp1)
+ model2 = mmtbx.model.manager(pdb_inp1)
+ trans_obj1 = iotbx.ncs.input(hierarchy=model1.get_hierarchy())
+ trans_obj2 = iotbx.ncs.input(hierarchy=model2.get_hierarchy())
+ ","def exercise():
+ pdb_inp1 = iotbx.pdb.input(source_info=None, lines=test_pdb)
+ pdb_inp2 = iotbx.pdb.input(source_info=None, lines=test_cif)
+ model1 = mmtbx.model.manager(pdb_inp1)
+ model2 = mmtbx.model.manager(pdb_inp2)
+ trans_obj1 = iotbx.ncs.input(hierarchy=model1.get_hierarchy())
+ trans_obj2 = iotbx.ncs.input(hierarchy=model2.get_hierarchy())
+ "
+2001,https://:@github.com/cctbx/cctbx_project.git,46af355112348574b808a6b026a7f3cafdc8c745,"@@ -965,7 +965,7 @@ class manager(object):
+ atoms = atoms.select(~ias_selection)
+ grm_geometry = self.get_restraints_manager().geometry
+ grm_geometry.pair_proxies(sites_cart)
+- struct_conn_loop = grm_geometry.get_struct_conn_mmcif(atoms)
++ struct_conn_loop = grm_geometry.get_struct_conn_mmcif(hierarchy_to_output)
+ cif_block.add_loop(struct_conn_loop)
+ self.get_model_statistics_info()
+ # outputting HELIX/SHEET records
+",mmtbx/model/model.py,"ReplaceText(target='hierarchy_to_output' @(968,60)->(968,65))","class manager(object):
+ atoms = atoms.select(~ias_selection)
+ grm_geometry = self.get_restraints_manager().geometry
+ grm_geometry.pair_proxies(sites_cart)
+ struct_conn_loop = grm_geometry.get_struct_conn_mmcif(atoms)
+ cif_block.add_loop(struct_conn_loop)
+ self.get_model_statistics_info()
+ # outputting HELIX/SHEET records","class manager(object):
+ atoms = atoms.select(~ias_selection)
+ grm_geometry = self.get_restraints_manager().geometry
+ grm_geometry.pair_proxies(sites_cart)
+ struct_conn_loop = grm_geometry.get_struct_conn_mmcif(hierarchy_to_output)
+ cif_block.add_loop(struct_conn_loop)
+ self.get_model_statistics_info()
+ # outputting HELIX/SHEET records"
+2002,https://:@github.com/cctbx/cctbx_project.git,fb3e93f9dc70a7d6027cdf4fcf906f78ad39ccf6,"@@ -244,7 +244,7 @@ def run(args, log=None, ccp4_map=None,
+ mtz_dataset.add_miller_array(
+ miller_array = f_obs.generate_r_free_flags(),
+ column_root_label = ""R-free-flags"")
+- if not nohl and params.k_blur is not None and params.b_blur is None:
++ if not nohl and params.k_blur is not None and params.b_blur is not None:
+ # convert phases into HL coefficeints
+ broadcast(m=""Convert phases into HL coefficients:"", log=log)
+ hl = get_hl(f_obs_cmpl=f_obs_cmpl, k_blur=params.k_blur, b_blur=params.b_blur)
+",mmtbx/command_line/map_to_structure_factors.py,"ReplaceText(target=' is not ' @(247,61)->(247,65))","def run(args, log=None, ccp4_map=None,
+ mtz_dataset.add_miller_array(
+ miller_array = f_obs.generate_r_free_flags(),
+ column_root_label = ""R-free-flags"")
+ if not nohl and params.k_blur is not None and params.b_blur is None:
+ # convert phases into HL coefficeints
+ broadcast(m=""Convert phases into HL coefficients:"", log=log)
+ hl = get_hl(f_obs_cmpl=f_obs_cmpl, k_blur=params.k_blur, b_blur=params.b_blur)","def run(args, log=None, ccp4_map=None,
+ mtz_dataset.add_miller_array(
+ miller_array = f_obs.generate_r_free_flags(),
+ column_root_label = ""R-free-flags"")
+ if not nohl and params.k_blur is not None and params.b_blur is not None:
+ # convert phases into HL coefficeints
+ broadcast(m=""Convert phases into HL coefficients:"", log=log)
+ hl = get_hl(f_obs_cmpl=f_obs_cmpl, k_blur=params.k_blur, b_blur=params.b_blur)"
+2003,https://:@github.com/cctbx/cctbx_project.git,534896eb6cac83fd73eec3cbc32a391e77ecdedc,"@@ -512,7 +512,7 @@ def select_crystal_symmetry(
+ if cs and not cs.is_nonsense() and not cs.is_empty():
+ is_similar_cs = cs0.is_similar_symmetry(cs,
+ absolute_angle_tolerance=absolute_angle_tolerance,
+- absolute_length_tolerance=absolute_angle_tolerance)
++ absolute_length_tolerance=absolute_length_tolerance)
+ if(not is_similar_cs):
+ msg = ""Crystal symmetry mismatch between different files.\n""
+ msg += ""%s %s\n"" % (cs0.unit_cell(), cs0.space_group_info())
+",cctbx/crystal/__init__.py,"ReplaceText(target='absolute_length_tolerance' @(515,37)->(515,61))","def select_crystal_symmetry(
+ if cs and not cs.is_nonsense() and not cs.is_empty():
+ is_similar_cs = cs0.is_similar_symmetry(cs,
+ absolute_angle_tolerance=absolute_angle_tolerance,
+ absolute_length_tolerance=absolute_angle_tolerance)
+ if(not is_similar_cs):
+ msg = ""Crystal symmetry mismatch between different files.\n""
+ msg += ""%s %s\n"" % (cs0.unit_cell(), cs0.space_group_info())","def select_crystal_symmetry(
+ if cs and not cs.is_nonsense() and not cs.is_empty():
+ is_similar_cs = cs0.is_similar_symmetry(cs,
+ absolute_angle_tolerance=absolute_angle_tolerance,
+ absolute_length_tolerance=absolute_length_tolerance)
+ if(not is_similar_cs):
+ msg = ""Crystal symmetry mismatch between different files.\n""
+ msg += ""%s %s\n"" % (cs0.unit_cell(), cs0.space_group_info())"
+2004,https://:@github.com/youngershen/django-super-cache.git,89da4b6ee32fe55c483b3919f6f1ee307da37f7a,"@@ -29,7 +29,7 @@ class FileBackend(BaseBackend):
+ cache_file = self.cache_dir + key
+
+ with open(cache_file, 'w') as f:
+- f.write(cache_file)
++ f.write(content)
+ f.flush()
+
+ def get(self, key):
+",django_super_cache/backends.py,"ReplaceText(target='content' @(32,20)->(32,30))","class FileBackend(BaseBackend):
+ cache_file = self.cache_dir + key
+
+ with open(cache_file, 'w') as f:
+ f.write(cache_file)
+ f.flush()
+
+ def get(self, key):","class FileBackend(BaseBackend):
+ cache_file = self.cache_dir + key
+
+ with open(cache_file, 'w') as f:
+ f.write(content)
+ f.flush()
+
+ def get(self, key):"
+2005,https://:@github.com/T-Eberle/tgbot.git,26a4dbd36902a1554c22f52f13f335a2b9e9bbe4,"@@ -59,4 +59,4 @@ def singleradiocommand(wrapped):
+ logger.exception(typo)
+ MessageController.hide_keyboard(message, message.chat_id(), ""Witzbold."")
+ deleteconv(message)
+- return wrapped
++ return _wrapped
+",telegram/bot/decorators/singleradiocommand.py,"ReplaceText(target='_wrapped' @(62,15)->(62,22))","def singleradiocommand(wrapped):
+ logger.exception(typo)
+ MessageController.hide_keyboard(message, message.chat_id(), ""Witzbold."")
+ deleteconv(message)
+ return wrapped","def singleradiocommand(wrapped):
+ logger.exception(typo)
+ MessageController.hide_keyboard(message, message.chat_id(), ""Witzbold."")
+ deleteconv(message)
+ return _wrapped"
+2006,https://:@github.com/Azure-Developments/ezzybot.git,0ebe7d860712b23bde58ba10bf4933277fa1db9b,"@@ -305,7 +305,7 @@ class ezzybot(Socket):
+ if regex._thread:
+ regex_thread = threading.Thread(target=self.run_trigger, args=(regex, wrappers.connection_wrapper(self), self.info))
+ regex_thread.daemon = True
+- plugin_thread.start()
++ regex_thread.start()
+ else:
+ self.run_trigger(regex, wrappers.connection_wrapper(self), self.info)
+ if self.nick not in self.db['users'].keys():
+",ezzybot/bot.py,"ReplaceText(target='regex_thread' @(308,32)->(308,45))","class ezzybot(Socket):
+ if regex._thread:
+ regex_thread = threading.Thread(target=self.run_trigger, args=(regex, wrappers.connection_wrapper(self), self.info))
+ regex_thread.daemon = True
+ plugin_thread.start()
+ else:
+ self.run_trigger(regex, wrappers.connection_wrapper(self), self.info)
+ if self.nick not in self.db['users'].keys():","class ezzybot(Socket):
+ if regex._thread:
+ regex_thread = threading.Thread(target=self.run_trigger, args=(regex, wrappers.connection_wrapper(self), self.info))
+ regex_thread.daemon = True
+ regex_thread.start()
+ else:
+ self.run_trigger(regex, wrappers.connection_wrapper(self), self.info)
+ if self.nick not in self.db['users'].keys():"
+2007,https://:@bitbucket.org/shiumachi/sphinxcontrib-recentpages.git,22c35dbac880b95d121bedb3b9e255c5ce67e654,"@@ -83,7 +83,7 @@ def get_file_list_ordered_by_mtime(target_dir, env):
+ for docname in env.found_docs:
+ abspath = env.doc2path(docname)
+ mtime = os.path.getmtime(abspath)
+- res.append((abspath,mtime))
++ res.append((docname,mtime))
+
+ res = list(set(res))
+ res.sort(cmp=lambda x,y: cmp(x[1], y[1]), reverse=True)
+",sphinx.recentpages/recentpages.py,"ReplaceText(target='docname' @(86,20)->(86,27))","def get_file_list_ordered_by_mtime(target_dir, env):
+ for docname in env.found_docs:
+ abspath = env.doc2path(docname)
+ mtime = os.path.getmtime(abspath)
+ res.append((abspath,mtime))
+
+ res = list(set(res))
+ res.sort(cmp=lambda x,y: cmp(x[1], y[1]), reverse=True)","def get_file_list_ordered_by_mtime(target_dir, env):
+ for docname in env.found_docs:
+ abspath = env.doc2path(docname)
+ mtime = os.path.getmtime(abspath)
+ res.append((docname,mtime))
+
+ res = list(set(res))
+ res.sort(cmp=lambda x,y: cmp(x[1], y[1]), reverse=True)"
+2008,https://:@github.com/frkhit/bl_wxpy.git,e2e191f226e74c9ea3547b94a5f4cf4bef2120dc,"@@ -85,7 +85,7 @@ class SentMessage(object):
+ """"""
+ from wxpy import Group
+
+- if isinstance(Group, self.receiver):
++ if isinstance(self.receiver, Group):
+ return self.receiver.self
+
+ @property
+",wxpy/api/messages/sent_message.py,"ArgSwap(idxs=0<->1 @(88,11)->(88,21))","class SentMessage(object):
+ """"""
+ from wxpy import Group
+
+ if isinstance(Group, self.receiver):
+ return self.receiver.self
+
+ @property","class SentMessage(object):
+ """"""
+ from wxpy import Group
+
+ if isinstance(self.receiver, Group):
+ return self.receiver.self
+
+ @property"
+2009,https://:@github.com/frkhit/bl_wxpy.git,c782a43af904ea346f4482f2e9e6617bece06166,"@@ -148,7 +148,7 @@ class Chat(object):
+ :param friend_or_mp: 好友对象或公众号对象
+ """"""
+
+- card_name = friend_or_mp.nickname if isinstance(Chat, friend_or_mp) else friend_or_mp
++ card_name = friend_or_mp.nickname if isinstance(friend_or_mp, Chat) else friend_or_mp
+ logger.info('sending {} to {}: {}'.format(CARD, self, card_name))
+
+ return self.core.send(
+",wxpy/api/chats/chat.py,"ArgSwap(idxs=0<->1 @(151,45)->(151,55))","class Chat(object):
+ :param friend_or_mp: 好友对象或公众号对象
+ """"""
+
+ card_name = friend_or_mp.nickname if isinstance(Chat, friend_or_mp) else friend_or_mp
+ logger.info('sending {} to {}: {}'.format(CARD, self, card_name))
+
+ return self.core.send(","class Chat(object):
+ :param friend_or_mp: 好友对象或公众号对象
+ """"""
+
+ card_name = friend_or_mp.nickname if isinstance(friend_or_mp, Chat) else friend_or_mp
+ logger.info('sending {} to {}: {}'.format(CARD, self, card_name))
+
+ return self.core.send("
+2010,https://:@github.com/kmarilleau/pytest-django-models.git,31fa2011c76bd1581d24bef19f422cebf644b03d,"@@ -237,7 +237,7 @@ class ModelGenerator:
+ # Ignore Special Methods.
+ or is_dunder(attr)
+ # Ignore Functions.
+- or inspect.isfunction(attr)
++ or inspect.isfunction(value)
+ # Ignore Django Model Attributes.
+ or attr in (""objects"", ""id"", ""_meta"")
+ # Ignore Fields.
+",pytest_django_model/objects.py,"ReplaceText(target='value' @(240,34)->(240,38))","class ModelGenerator:
+ # Ignore Special Methods.
+ or is_dunder(attr)
+ # Ignore Functions.
+ or inspect.isfunction(attr)
+ # Ignore Django Model Attributes.
+ or attr in (""objects"", ""id"", ""_meta"")
+ # Ignore Fields.","class ModelGenerator:
+ # Ignore Special Methods.
+ or is_dunder(attr)
+ # Ignore Functions.
+ or inspect.isfunction(value)
+ # Ignore Django Model Attributes.
+ or attr in (""objects"", ""id"", ""_meta"")
+ # Ignore Fields."
+2011,https://:@github.com/fixstars/clpy.git,d751a0614598bf05b9bbfd15eb0d05e26e562649,"@@ -151,7 +151,7 @@ class BatchNormalization(function.Function):
+
+ def check_type_backward(self, in_types, out_types):
+ type_check.expect(out_types.size() == 1)
+- x_type, = out_types
++ x_type, = in_types
+ y_type, = out_types
+
+ type_check.expect(
+",chainer/functions/batch_normalization.py,"ReplaceText(target='in_types' @(154,18)->(154,27))","class BatchNormalization(function.Function):
+
+ def check_type_backward(self, in_types, out_types):
+ type_check.expect(out_types.size() == 1)
+ x_type, = out_types
+ y_type, = out_types
+
+ type_check.expect(","class BatchNormalization(function.Function):
+
+ def check_type_backward(self, in_types, out_types):
+ type_check.expect(out_types.size() == 1)
+ x_type, = in_types
+ y_type, = out_types
+
+ type_check.expect("
+2012,https://:@github.com/fixstars/clpy.git,447e1e6aaf5590b7bdce63afb826a754d03274d8,"@@ -208,7 +208,7 @@ class Optimizer(object):
+ with cuda.get_device(g_dst):
+ if (isinstance(g_src, cuda.ndarray) and
+ g_dst.gpudata.device != g_src.gpudata.device):
+- g_dst += cuda.copy(g_src, out_device=g_src.gpudata.device)
++ g_dst += cuda.copy(g_src, out_device=g_dst.gpudata.device)
+ else:
+ g_dst += cuda.to_gpu(g_src)
+
+",chainer/optimizer.py,"ReplaceText(target='g_dst' @(211,57)->(211,62))","class Optimizer(object):
+ with cuda.get_device(g_dst):
+ if (isinstance(g_src, cuda.ndarray) and
+ g_dst.gpudata.device != g_src.gpudata.device):
+ g_dst += cuda.copy(g_src, out_device=g_src.gpudata.device)
+ else:
+ g_dst += cuda.to_gpu(g_src)
+ ","class Optimizer(object):
+ with cuda.get_device(g_dst):
+ if (isinstance(g_src, cuda.ndarray) and
+ g_dst.gpudata.device != g_src.gpudata.device):
+ g_dst += cuda.copy(g_src, out_device=g_dst.gpudata.device)
+ else:
+ g_dst += cuda.to_gpu(g_src)
+ "
+2013,https://:@github.com/fixstars/clpy.git,2cd7ddd29647184e00e79a551c37d6e975141e83,"@@ -10,7 +10,7 @@ class Contrastive(function.Function):
+ """"""Contrastive loss function.""""""
+
+ def __init__(self, margin):
+- if margin < 0:
++ if margin <= 0:
+ raise Exception(""margin should be positive value."")
+ self.margin = margin
+
+",chainer/functions/loss/contrastive.py,"ReplaceText(target='<=' @(13,18)->(13,19))","class Contrastive(function.Function):
+ """"""Contrastive loss function.""""""
+
+ def __init__(self, margin):
+ if margin < 0:
+ raise Exception(""margin should be positive value."")
+ self.margin = margin
+ ","class Contrastive(function.Function):
+ """"""Contrastive loss function.""""""
+
+ def __init__(self, margin):
+ if margin <= 0:
+ raise Exception(""margin should be positive value."")
+ self.margin = margin
+ "
+2014,https://:@github.com/fixstars/clpy.git,1f29bf157ef8289a6a16cfc19ea8737473623a7e,"@@ -32,7 +32,7 @@ def array_split(ary, indices_or_sections, axis=0):
+ for index in indices:
+ ret.append(ary[skip + (slice(i, index),)])
+ i = index
+- ret.append(ary[skip + (slice(index, size),)])
++ ret.append(ary[skip + (slice(i, size),)])
+
+ return ret
+
+",cupy/manipulation/split.py,"ReplaceText(target='i' @(35,33)->(35,38))","def array_split(ary, indices_or_sections, axis=0):
+ for index in indices:
+ ret.append(ary[skip + (slice(i, index),)])
+ i = index
+ ret.append(ary[skip + (slice(index, size),)])
+
+ return ret
+ ","def array_split(ary, indices_or_sections, axis=0):
+ for index in indices:
+ ret.append(ary[skip + (slice(i, index),)])
+ i = index
+ ret.append(ary[skip + (slice(i, size),)])
+
+ return ret
+ "
+2015,https://:@github.com/fixstars/clpy.git,74b521b9ec3a8b0ceda86041d9e9f78ffdd8d5a1,"@@ -123,7 +123,7 @@ def hstack(tup):
+ axis = 1
+ if arrs[0].ndim == 1:
+ axis = 0
+- return concatenate(tup, axis)
++ return concatenate(arrs, axis)
+
+
+ def vstack(tup):
+",cupy/manipulation/join.py,"ReplaceText(target='arrs' @(126,23)->(126,26))","def hstack(tup):
+ axis = 1
+ if arrs[0].ndim == 1:
+ axis = 0
+ return concatenate(tup, axis)
+
+
+ def vstack(tup):","def hstack(tup):
+ axis = 1
+ if arrs[0].ndim == 1:
+ axis = 0
+ return concatenate(arrs, axis)
+
+
+ def vstack(tup):"
+2016,https://:@github.com/fixstars/clpy.git,4faf0402e83dcb3e2486fff862142f92f61cf75f,"@@ -54,7 +54,7 @@ def exec_ultima(source, _clpy_header=''):
+ proc.kill()
+ source, errstream = proc.communicate()
+
+- if proc.returncode != 0 and len(errstream) > 0:
++ if proc.returncode != 0 or len(errstream) > 0:
+ raise clpy.backend.ultima.exceptions.UltimaRuntimeError(
+ proc.returncode, errstream)
+
+",tests/clpy_tests/opencl_tests/ultima_tests/utility.py,"ReplaceText(target='or' @(57,32)->(57,35))","def exec_ultima(source, _clpy_header=''):
+ proc.kill()
+ source, errstream = proc.communicate()
+
+ if proc.returncode != 0 and len(errstream) > 0:
+ raise clpy.backend.ultima.exceptions.UltimaRuntimeError(
+ proc.returncode, errstream)
+ ","def exec_ultima(source, _clpy_header=''):
+ proc.kill()
+ source, errstream = proc.communicate()
+
+ if proc.returncode != 0 or len(errstream) > 0:
+ raise clpy.backend.ultima.exceptions.UltimaRuntimeError(
+ proc.returncode, errstream)
+ "
+2017,https://:@github.com/ashleysommer/sanic-oauthlib.git,ae9f946b2b2739bb352961c200b2e4eeaba67044,"@@ -323,7 +323,7 @@ class OAuthRemoteApp(object):
+ if attr:
+ return attr
+ if default is not False and not self.app_key:
+- return attr
++ return default
+ app = self.oauth.app or current_app
+ config = app.config[self.app_key]
+ if default is not False:
+",flask_oauthlib/client.py,"ReplaceText(target='default' @(326,19)->(326,23))","class OAuthRemoteApp(object):
+ if attr:
+ return attr
+ if default is not False and not self.app_key:
+ return attr
+ app = self.oauth.app or current_app
+ config = app.config[self.app_key]
+ if default is not False:","class OAuthRemoteApp(object):
+ if attr:
+ return attr
+ if default is not False and not self.app_key:
+ return default
+ app = self.oauth.app or current_app
+ config = app.config[self.app_key]
+ if default is not False:"
+2018,https://:@github.com/arangb/isbnlib-dnb.git,929ff7c071c452c316769df0d236af29f92d5cbf,"@@ -51,7 +51,7 @@ def parser_dnb(data):
+ #Kindergartenblock - Verbinden, vergleichen, Fehler finden ab 4 Jahre / Linda Bayerl |