project
stringlengths 1
98
| commit_sha
stringlengths 40
40
| parent_sha
stringlengths 40
40
| file_path
stringlengths 4
209
| project_url
stringlengths 23
132
| likely_bug
bool 1
class | comodified
bool 1
class | in_function
bool 2
classes | diff
stringlengths 27
9.71k
| before
stringlengths 1
8.91k
| after
stringlengths 1
6k
| sstub_pattern
stringclasses 23
values | edit_script
stringlengths 33
158k
| key
stringlengths 45
154
| commit_message
stringlengths 3
65.5k
⌀ | files
list |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ngraph | 14b740b1baec641e25142bcdc7b42f1b2e631b34 | 73b56168da47fdc414d69223367e527c8e96d1a8 | ngraph/transformers/passes/hetrpasses.py | https://github.com/rsumner31/ngraph | true | false | true | @@ -30,7 +30,7 @@ class DeviceAssignPass(GraphBuildingPass):
def visit(self, op):
device = op.metadata.setdefault('device', self.default_device)
- if len(op.metadata['device_id']) == 1:
+ if 'device_id' in op.metadata and isinstance(op.metadata['device_id'], (list, tuple)) and len(op.metadata['device_id']) == 1:
op.metadata['device_id'] = '1'
device_id = op.metadata.setdefault('device_id', self.default_device_id)
transformer = "{}{}".format(device, device_id)
| if len ( op . metadata [ 'device_id' ] ) == 1 : op . metadata [ 'device_id' ] = '1' | if 'device_id' in op . metadata and isinstance ( op . metadata [ 'device_id' ] , ( list , tuple ) ) and len ( op . metadata [ 'device_id' ] ) == 1 : op . metadata [ 'device_id' ] = '1' | MORE_SPECIFIC_IF | [["Insert", ["if_statement", 3, 9, 4, 43], ["boolean_operator", "N0"], 1], ["Insert", "N0", ["boolean_operator", "N1"], 0], ["Insert", "N0", ["and:and", "T"], 1], ["Move", "N0", ["comparison_operator", 3, 12, 3, 46], 2], ["Insert", "N1", ["comparison_operator", "N2"], 0], ["Insert", "N1", ["and:and", "T"], 1], ["Insert", "N1", ["call", "N3"], 2], ["Insert", "N2", ["string:'device_id'", "T"], 0], ["Insert", "N2", ["in:in", "T"], 1], ["Insert", "N2", ["attribute", "N4"], 2], ["Insert", "N3", ["identifier:isinstance", "T"], 0], ["Insert", "N3", ["argument_list", "N5"], 1], ["Insert", "N4", ["identifier:op", "T"], 0], ["Insert", "N4", [".:.", "T"], 1], ["Insert", "N4", ["identifier:metadata", "T"], 2], ["Insert", "N5", ["(:(", "T"], 0], ["Insert", "N5", ["subscript", "N6"], 1], ["Insert", "N5", [",:,", "T"], 2], ["Insert", "N5", ["tuple", "N7"], 3], ["Insert", "N5", ["):)", "T"], 4], ["Insert", "N6", ["attribute", "N8"], 0], ["Insert", "N6", ["[:[", "T"], 1], ["Insert", "N6", ["string:'device_id'", "T"], 2], ["Insert", "N6", ["]:]", "T"], 3], ["Insert", "N7", ["(:(", "T"], 0], ["Insert", "N7", ["identifier:list", "T"], 1], ["Insert", "N7", [",:,", "T"], 2], ["Insert", "N7", ["identifier:tuple", "T"], 3], ["Insert", "N7", ["):)", "T"], 4], ["Insert", "N8", ["identifier:op", "T"], 0], ["Insert", "N8", [".:.", "T"], 1], ["Insert", "N8", ["identifier:metadata", "T"], 2]] | rsumner31/ngraph@14b740b1baec641e25142bcdc7b42f1b2e631b34 | WIP fixes | [
{
"sha": "9152bb3d6c0e37c8254fd89e1764d74907eeeeb0",
"filename": "ngraph/transformers/passes/hetrpasses.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/rsumner31/ngraph/blob/14b740b1baec641e25142bcdc7b42f1b2e631b34/ngraph%2Ftransformers%2Fpasses%2Fhetrpasses.py",
"raw_url": "https://github.com/rsumner31/ngraph/raw/14b740b1baec641e25142bcdc7b42f1b2e631b34/ngraph%2Ftransformers%2Fpasses%2Fhetrpasses.py",
"contents_url": "https://api.github.com/repos/rsumner31/ngraph/contents/ngraph%2Ftransformers%2Fpasses%2Fhetrpasses.py?ref=14b740b1baec641e25142bcdc7b42f1b2e631b34",
"patch": "@@ -30,7 +30,7 @@ def __init__(self, hetr, default_device, default_device_id):\n \n def visit(self, op):\n device = op.metadata.setdefault('device', self.default_device)\n- if len(op.metadata['device_id']) == 1:\n+ if 'device_id' in op.metadata and isinstance(op.metadata['device_id'], (list, tuple)) and len(op.metadata['device_id']) == 1:\n op.metadata['device_id'] = '1'\n device_id = op.metadata.setdefault('device_id', self.default_device_id)\n transformer = \"{}{}\".format(device, device_id)"
}
] |
ngraph | 1445e0684fbcca2ec49a5f1becf1345159b7ba6a | 4eb8eed57e506e8a2745b298340666e9d7e5ce58 | ngraph/op_graph/op_graph.py | https://github.com/rsumner31/ngraph | true | false | true | @@ -787,7 +787,7 @@ def set_item(tensor, item, value):
sl = slice(sl)
start, end, step = sl.indices(l)
if step <= 0:
- raise ValueError('Invalid slice in item {}'.format(item))
+ raise ValueError('Invalid slice (negative step) in item {}'.format(item))
return assign(tensor_slice(tensor, item, axes=value.axes), value)
| raise ValueError ( 'Invalid slice in item {}' . format ( item ) ) | raise ValueError ( 'Invalid slice (negative step) in item {}' . format ( item ) ) | CHANGE_STRING_LITERAL | [["Update", ["string:'Invalid slice in item {}'", 3, 30, 3, 56], "'Invalid slice (negative step) in item {}'"]] | rsumner31/ngraph@1445e0684fbcca2ec49a5f1becf1345159b7ba6a | Better error description. | [
{
"sha": "52e76a0a5acb043db75592be1bdd09fc6fedf932",
"filename": "ngraph/op_graph/op_graph.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/rsumner31/ngraph/blob/1445e0684fbcca2ec49a5f1becf1345159b7ba6a/ngraph%2Fop_graph%2Fop_graph.py",
"raw_url": "https://github.com/rsumner31/ngraph/raw/1445e0684fbcca2ec49a5f1becf1345159b7ba6a/ngraph%2Fop_graph%2Fop_graph.py",
"contents_url": "https://api.github.com/repos/rsumner31/ngraph/contents/ngraph%2Fop_graph%2Fop_graph.py?ref=1445e0684fbcca2ec49a5f1becf1345159b7ba6a",
"patch": "@@ -787,7 +787,7 @@ def set_item(tensor, item, value):\n sl = slice(sl)\n start, end, step = sl.indices(l)\n if step <= 0:\n- raise ValueError('Invalid slice in item {}'.format(item))\n+ raise ValueError('Invalid slice (negative step) in item {}'.format(item))\n return assign(tensor_slice(tensor, item, axes=value.axes), value)\n \n "
}
] |
ngraph | 3136396b434813fc8e6fa5eacb48cbc6ed04506a | a8524402bb2c1fd9c63f4af29ee01147f5360c42 | ngraph/op_graph/op_graph.py | https://github.com/rsumner31/ngraph | true | false | true | @@ -1654,7 +1654,7 @@ class RoleCastOp(AxesCastOp):
.format(axes, x.axes)
)
- def copy_op_with_new_args(self, args):
+ def copy_with_new_args(self, args):
return type(self)(args[0], axes=self.axes)
def generate_adjoints(self, adjoints, delta, x):
| def copy_op_with_new_args ( self , args ) : return type ( self ) ( args [ 0 ] , axes = self . axes ) | def copy_with_new_args ( self , args ) : return type ( self ) ( args [ 0 ] , axes = self . axes ) | SINGLE_TOKEN | [["Update", ["identifier:copy_op_with_new_args", 3, 9, 3, 30], "copy_with_new_args"]] | rsumner31/ngraph@3136396b434813fc8e6fa5eacb48cbc6ed04506a | Fix typo | [
{
"sha": "8d0b63edcc196be3bff5f2813f98cb3e324ed7d8",
"filename": "ngraph/op_graph/op_graph.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/rsumner31/ngraph/blob/3136396b434813fc8e6fa5eacb48cbc6ed04506a/ngraph%2Fop_graph%2Fop_graph.py",
"raw_url": "https://github.com/rsumner31/ngraph/raw/3136396b434813fc8e6fa5eacb48cbc6ed04506a/ngraph%2Fop_graph%2Fop_graph.py",
"contents_url": "https://api.github.com/repos/rsumner31/ngraph/contents/ngraph%2Fop_graph%2Fop_graph.py?ref=3136396b434813fc8e6fa5eacb48cbc6ed04506a",
"patch": "@@ -1654,7 +1654,7 @@ def _check_valid_axes(self, x, axes):\n .format(axes, x.axes)\n )\n \n- def copy_op_with_new_args(self, args):\n+ def copy_with_new_args(self, args):\n return type(self)(args[0], axes=self.axes)\n \n def generate_adjoints(self, adjoints, delta, x):"
}
] |
ngraph | 85e84fa359d23357cb1d59cff1f6da5ff671e5ec | 5e55a9cb79f1ca70521ee4a37a771647a713cfc2 | ngraph/transformers/passes/hetrpasses.py | https://github.com/rsumner31/ngraph | true | false | true | @@ -31,7 +31,7 @@ class DeviceAssignPass(GraphBuildingPass):
def visit(self, op, *args):
device = op.metadata.setdefault('device', self.default_device)
if 'device_id' in op.metadata and isinstance(op.metadata['device_id'], (list, tuple)) and len(op.metadata['device_id']) == 1:
- op.metadata['device_id'] = '1'
+ op.metadata['device_id'] = op.metadata['device_id'][0]
device_id = op.metadata.setdefault('device_id', self.default_device_id)
transformer = "{}{}".format(device, device_id)
op.metadata['host_transformer'] = socket.gethostname()
| op . metadata [ 'device_id' ] = '1' | op . metadata [ 'device_id' ] = op . metadata [ 'device_id' ] [ 0 ] | SINGLE_STMT | [["Insert", ["assignment", 3, 13, 3, 43], ["subscript", "N0"], 2], ["Insert", "N0", ["subscript", "N1"], 0], ["Insert", "N0", ["[:[", "T"], 1], ["Insert", "N0", ["integer:0", "T"], 2], ["Insert", "N0", ["]:]", "T"], 3], ["Insert", "N1", ["attribute", "N2"], 0], ["Insert", "N1", ["[:[", "T"], 1], ["Insert", "N1", ["string:'device_id'", "T"], 2], ["Insert", "N1", ["]:]", "T"], 3], ["Insert", "N2", ["identifier:op", "T"], 0], ["Insert", "N2", [".:.", "T"], 1], ["Insert", "N2", ["identifier:metadata", "T"], 2], ["Delete", ["string:'1'", 3, 40, 3, 43]]] | rsumner31/ngraph@85e84fa359d23357cb1d59cff1f6da5ff671e5ec | fix hardcode | [
{
"sha": "630d1c3b02a217a2dbe12564dce3685625d8f363",
"filename": "ngraph/transformers/passes/hetrpasses.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/rsumner31/ngraph/blob/85e84fa359d23357cb1d59cff1f6da5ff671e5ec/ngraph%2Ftransformers%2Fpasses%2Fhetrpasses.py",
"raw_url": "https://github.com/rsumner31/ngraph/raw/85e84fa359d23357cb1d59cff1f6da5ff671e5ec/ngraph%2Ftransformers%2Fpasses%2Fhetrpasses.py",
"contents_url": "https://api.github.com/repos/rsumner31/ngraph/contents/ngraph%2Ftransformers%2Fpasses%2Fhetrpasses.py?ref=85e84fa359d23357cb1d59cff1f6da5ff671e5ec",
"patch": "@@ -31,7 +31,7 @@ def __init__(self, hetr, default_device, default_device_id):\n def visit(self, op, *args):\n device = op.metadata.setdefault('device', self.default_device)\n if 'device_id' in op.metadata and isinstance(op.metadata['device_id'], (list, tuple)) and len(op.metadata['device_id']) == 1:\n- op.metadata['device_id'] = '1'\n+ op.metadata['device_id'] = op.metadata['device_id'][0]\n device_id = op.metadata.setdefault('device_id', self.default_device_id)\n transformer = \"{}{}\".format(device, device_id)\n op.metadata['host_transformer'] = socket.gethostname()"
}
] |
ngraph | 41c47b854c352fec23a086918436227e15f53a22 | 0e7c49699718335f045458c73c0da25082aa4d3b | ngraph/frontends/tensorflow/tests/test_examples.py | https://github.com/rsumner31/ngraph | true | false | true | @@ -89,7 +89,7 @@ class TestExamples(ImporterTester):
np.asarray(tf_cost_vals).astype(np.float32))
def test_mnist_mlp_save_load(self):
- if self.transformer_name == 'hetr':
+ if self.transformer_name in ['hetr', 'gpu']:
pytest.xfail("hetr fails this during make test")
# args
parser = argparse.ArgumentParser()
| if self . transformer_name == 'hetr' : pytest . xfail ( "hetr fails this during make test" ) | if self . transformer_name in [ 'hetr' , 'gpu' ] : pytest . xfail ( "hetr fails this during make test" ) | SINGLE_STMT | [["Insert", ["comparison_operator", 3, 12, 3, 43], ["in:in", "T"], 1], ["Insert", ["comparison_operator", 3, 12, 3, 43], ["list", "N0"], 2], ["Insert", "N0", ["[:[", "T"], 0], ["Move", "N0", ["string:'hetr'", 3, 37, 3, 43], 1], ["Insert", "N0", [",:,", "T"], 2], ["Insert", "N0", ["string:'gpu'", "T"], 3], ["Insert", "N0", ["]:]", "T"], 4], ["Delete", ["==:==", 3, 34, 3, 36]]] | rsumner31/ngraph@41c47b854c352fec23a086918436227e15f53a22 | xfail test_mnist_mlp_save_load on gpu (issue #973) | [
{
"sha": "fa8bc785d5af8dcc9319a1673e18ef57ec920bfc",
"filename": "ngraph/frontends/tensorflow/tests/test_examples.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/rsumner31/ngraph/blob/41c47b854c352fec23a086918436227e15f53a22/ngraph%2Ffrontends%2Ftensorflow%2Ftests%2Ftest_examples.py",
"raw_url": "https://github.com/rsumner31/ngraph/raw/41c47b854c352fec23a086918436227e15f53a22/ngraph%2Ffrontends%2Ftensorflow%2Ftests%2Ftest_examples.py",
"contents_url": "https://api.github.com/repos/rsumner31/ngraph/contents/ngraph%2Ffrontends%2Ftensorflow%2Ftests%2Ftest_examples.py?ref=41c47b854c352fec23a086918436227e15f53a22",
"patch": "@@ -89,7 +89,7 @@ def test_mnist_mlp(self):\n np.asarray(tf_cost_vals).astype(np.float32))\n \n def test_mnist_mlp_save_load(self):\n- if self.transformer_name == 'hetr':\n+ if self.transformer_name in ['hetr', 'gpu']:\n pytest.xfail(\"hetr fails this during make test\")\n # args\n parser = argparse.ArgumentParser()"
}
] |
ngraph | 7d39d25f8ba809394121a918bcd0e8706f4720ea | e0444f1583194c1ec2114f381277a3207183e01f | ngraph/factory/comm_node_factory.py | https://github.com/rsumner31/ngraph | true | false | false | @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# ----------------------------------------------------------------------------
-from comm_nodes import GpuQueueSendOp, GpuQueueRecvOp, NumpyQueueSendOp, \
+from .comm_nodes import GpuQueueSendOp, GpuQueueRecvOp, NumpyQueueSendOp, \
NumpyQueueRecvOp, NumpyQueueGatherSendOp, NumpyQueueGatherRecvOp, \
NumpyQueueScatterSendOp, NumpyQueueScatterRecvOp
from collections import defaultdict
| from comm_nodes import GpuQueueSendOp , GpuQueueRecvOp , NumpyQueueSendOp , NumpyQueueRecvOp , NumpyQueueGatherSendOp , NumpyQueueGatherRecvOp , NumpyQueueScatterSendOp , NumpyQueueScatterRecvOp | from . comm_nodes import GpuQueueSendOp , GpuQueueRecvOp , NumpyQueueSendOp , NumpyQueueRecvOp , NumpyQueueGatherSendOp , NumpyQueueGatherRecvOp , NumpyQueueScatterSendOp , NumpyQueueScatterRecvOp | SINGLE_STMT | [["Insert", ["import_from_statement", 3, 1, 5, 53], ["relative_import", "N0"], 1], ["Insert", "N0", ["import_prefix", "N1"], 0], ["Move", "N0", ["dotted_name", 3, 6, 3, 16], 1], ["Insert", "N1", [".:.", "T"], 0]] | rsumner31/ngraph@7d39d25f8ba809394121a918bcd0e8706f4720ea | PY3 fix | [
{
"sha": "92e9586a3e1cdfd03343458b2329a0e8eb3e4d59",
"filename": "ngraph/factory/comm_node_factory.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/rsumner31/ngraph/blob/7d39d25f8ba809394121a918bcd0e8706f4720ea/ngraph%2Ffactory%2Fcomm_node_factory.py",
"raw_url": "https://github.com/rsumner31/ngraph/raw/7d39d25f8ba809394121a918bcd0e8706f4720ea/ngraph%2Ffactory%2Fcomm_node_factory.py",
"contents_url": "https://api.github.com/repos/rsumner31/ngraph/contents/ngraph%2Ffactory%2Fcomm_node_factory.py?ref=7d39d25f8ba809394121a918bcd0e8706f4720ea",
"patch": "@@ -12,7 +12,7 @@\n # See the License for the specific language governing permissions and\n # limitations under the License.\n # ----------------------------------------------------------------------------\n-from comm_nodes import GpuQueueSendOp, GpuQueueRecvOp, NumpyQueueSendOp, \\\n+from .comm_nodes import GpuQueueSendOp, GpuQueueRecvOp, NumpyQueueSendOp, \\\n NumpyQueueRecvOp, NumpyQueueGatherSendOp, NumpyQueueGatherRecvOp, \\\n NumpyQueueScatterSendOp, NumpyQueueScatterRecvOp\n from collections import defaultdict"
}
] |
ngraph | be7140fddd51aee748f26e8939975a5ecb0d1d49 | c4cf5605699ef9b2a7f6a9f8dfc554987fbb1c9d | ngraph/frontends/neon/tests/test_linear_layer.py | https://github.com/rsumner31/ngraph | true | false | true | @@ -101,7 +101,7 @@ def test_linear_W_axes_nout():
x = ng.placeholder([feature_axis, batch_axis])
linear = Linear(nout=3, init=UniformInit(1.0, 1.0))
- out = linear(x)
+ linear(x)
assert linear.W.axes.batch_axis() is None
assert feature_axis in linear.W.axes
| out = linear ( x ) | linear ( x ) | SINGLE_STMT | [["Move", ["expression_statement", 3, 5, 3, 20], ["call", 3, 11, 3, 20], 0], ["Delete", ["identifier:out", 3, 5, 3, 8]], ["Delete", ["=:=", 3, 9, 3, 10]], ["Delete", ["assignment", 3, 5, 3, 20]]] | rsumner31/ngraph@be7140fddd51aee748f26e8939975a5ecb0d1d49 | style fix | [
{
"sha": "d15e2f893d8ada74bf1ff0a2f00db1d47c38171d",
"filename": "ngraph/frontends/neon/tests/test_linear_layer.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/rsumner31/ngraph/blob/be7140fddd51aee748f26e8939975a5ecb0d1d49/ngraph%2Ffrontends%2Fneon%2Ftests%2Ftest_linear_layer.py",
"raw_url": "https://github.com/rsumner31/ngraph/raw/be7140fddd51aee748f26e8939975a5ecb0d1d49/ngraph%2Ffrontends%2Fneon%2Ftests%2Ftest_linear_layer.py",
"contents_url": "https://api.github.com/repos/rsumner31/ngraph/contents/ngraph%2Ffrontends%2Fneon%2Ftests%2Ftest_linear_layer.py?ref=be7140fddd51aee748f26e8939975a5ecb0d1d49",
"patch": "@@ -101,7 +101,7 @@ def test_linear_W_axes_nout():\n \n x = ng.placeholder([feature_axis, batch_axis])\n linear = Linear(nout=3, init=UniformInit(1.0, 1.0))\n- out = linear(x)\n+ linear(x)\n \n assert linear.W.axes.batch_axis() is None\n assert feature_axis in linear.W.axes"
}
] |
ngraph | 141580c21b9acced26475721ebe42c59a5a19b98 | abd99cff0c6dd42604a5064b65a7fb7ba47e8edd | ngraph/frontends/neon/layer.py | https://github.com/rsumner31/ngraph | true | false | true | @@ -176,7 +176,7 @@ class Linear(Layer):
def __call__(self, in_obj):
if self.W is None:
self.W = ng.variable(
- axes=in_obj.axes.feature_axes() + self.axes_map.keys(),
+ axes=ng.make_axes(self.axes_map.keys()) + in_obj.axes.feature_axes(),
initial_value=self.init,
).named('LinW')
| self . W = ng . variable ( axes = in_obj . axes . feature_axes ( ) + self . axes_map . keys ( ) , initial_value = self . init , ) . named ( 'LinW' ) | self . W = ng . variable ( axes = ng . make_axes ( self . axes_map . keys ( ) ) + in_obj . axes . feature_axes ( ) , initial_value = self . init , ) . named ( 'LinW' ) | SINGLE_STMT | [["Move", ["call", 3, 22, 3, 48], ["binary_operator", 3, 22, 3, 71], 1], ["Insert", ["binary_operator", 3, 22, 3, 71], ["call", "N0"], 0], ["Insert", "N0", ["attribute", "N1"], 0], ["Insert", "N0", ["argument_list", "N2"], 1], ["Insert", "N1", ["identifier:ng", "T"], 0], ["Insert", "N1", [".:.", "T"], 1], ["Insert", "N1", ["identifier:make_axes", "T"], 2], ["Insert", "N2", ["(:(", "T"], 0], ["Move", "N2", ["call", 3, 51, 3, 71], 1], ["Insert", "N2", ["):)", "T"], 2]] | rsumner31/ngraph@141580c21b9acced26475721ebe42c59a5a19b98 | use out axes first ordering to fix strange convergence bug | [
{
"sha": "8f48c9c9d566f5a5a5e95cd92a9395545c2b5e04",
"filename": "ngraph/frontends/neon/layer.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/rsumner31/ngraph/blob/141580c21b9acced26475721ebe42c59a5a19b98/ngraph%2Ffrontends%2Fneon%2Flayer.py",
"raw_url": "https://github.com/rsumner31/ngraph/raw/141580c21b9acced26475721ebe42c59a5a19b98/ngraph%2Ffrontends%2Fneon%2Flayer.py",
"contents_url": "https://api.github.com/repos/rsumner31/ngraph/contents/ngraph%2Ffrontends%2Fneon%2Flayer.py?ref=141580c21b9acced26475721ebe42c59a5a19b98",
"patch": "@@ -176,7 +176,7 @@ def __init__(self, init, nout=None, axes=None, **kwargs):\n def __call__(self, in_obj):\n if self.W is None:\n self.W = ng.variable(\n- axes=in_obj.axes.feature_axes() + self.axes_map.keys(),\n+ axes=ng.make_axes(self.axes_map.keys()) + in_obj.axes.feature_axes(),\n initial_value=self.init,\n ).named('LinW')\n "
}
] |
ngraph | 12ca393478b1b917a50d8e565a46d56ca7301a0d | f3210acc61a64a52e06578d5a3ee59378d64a2b3 | examples/cifar10/cifar10_conv.py | https://github.com/rsumner31/ngraph | true | false | false | @@ -31,7 +31,7 @@ import numpy as np
import ngraph as ng
from ngraph.frontends.neon import Layer, Affine, Preprocess, Convolution, Pool2D, Sequential
from ngraph.frontends.neon import UniformInit, Rectlin, Softmax, GradientDescentMomentum
-from ngraph.frontends.neon import ax, ar, loop_train
+from ngraph.frontends.neon import ax, loop_train
from ngraph.frontends.neon import NgraphArgparser, make_bound_computation, make_default_callbacks
from ngraph.frontends.neon import ArrayIterator
| from ngraph . frontends . neon import ax , ar , loop_train | from ngraph . frontends . neon import ax , loop_train | SINGLE_STMT | [["Delete", ["identifier:ar", 3, 39, 3, 41]], ["Delete", ["dotted_name", 3, 39, 3, 41]], ["Delete", [",:,", 3, 41, 3, 42]]] | rsumner31/ngraph@12ca393478b1b917a50d8e565a46d56ca7301a0d | Style fix | [
{
"sha": "d7600b2ab733973b166230522e6fc323bddfef64",
"filename": "examples/cifar10/cifar10_conv.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/rsumner31/ngraph/blob/12ca393478b1b917a50d8e565a46d56ca7301a0d/examples%2Fcifar10%2Fcifar10_conv.py",
"raw_url": "https://github.com/rsumner31/ngraph/raw/12ca393478b1b917a50d8e565a46d56ca7301a0d/examples%2Fcifar10%2Fcifar10_conv.py",
"contents_url": "https://api.github.com/repos/rsumner31/ngraph/contents/examples%2Fcifar10%2Fcifar10_conv.py?ref=12ca393478b1b917a50d8e565a46d56ca7301a0d",
"patch": "@@ -31,7 +31,7 @@\n import ngraph as ng\n from ngraph.frontends.neon import Layer, Affine, Preprocess, Convolution, Pool2D, Sequential\n from ngraph.frontends.neon import UniformInit, Rectlin, Softmax, GradientDescentMomentum\n-from ngraph.frontends.neon import ax, ar, loop_train\n+from ngraph.frontends.neon import ax, loop_train\n from ngraph.frontends.neon import NgraphArgparser, make_bound_computation, make_default_callbacks\n from ngraph.frontends.neon import ArrayIterator\n "
}
] |
ngraph | 8b80d6556c43d3bd7c45d44cc2c0819368b2b37c | 3eb528a1bb4629837d995d4837c3bb9b04b2f656 | ngraph/transformers/hetrtransform.py | https://github.com/rsumner31/ngraph | true | false | true | @@ -357,7 +357,7 @@ class HetrTransformer(Transformer):
def register_graph_pass(self, graph_pass):
from ngraph.transformers.passes.nviz import VizPass
if isinstance(graph_pass, VizPass):
- self.hetr_passes.append(graph_pass)
+ self.passes.append(graph_pass)
else:
raise RuntimeError("Unsupported Graph Pass for Hetr: {}".format(graph_pass))
| self . hetr_passes . append ( graph_pass ) | self . passes . append ( graph_pass ) | CHANGE_ATTRIBUTE_USED | [["Update", ["identifier:hetr_passes", 3, 18, 3, 29], "passes"]] | rsumner31/ngraph@8b80d6556c43d3bd7c45d44cc2c0819368b2b37c | fix missed rename (hetr_passes -> passes) #1195 | [
{
"sha": "1272ba45f2685963d4e9b28df39d6467142346d5",
"filename": "ngraph/transformers/hetrtransform.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/rsumner31/ngraph/blob/8b80d6556c43d3bd7c45d44cc2c0819368b2b37c/ngraph%2Ftransformers%2Fhetrtransform.py",
"raw_url": "https://github.com/rsumner31/ngraph/raw/8b80d6556c43d3bd7c45d44cc2c0819368b2b37c/ngraph%2Ftransformers%2Fhetrtransform.py",
"contents_url": "https://api.github.com/repos/rsumner31/ngraph/contents/ngraph%2Ftransformers%2Fhetrtransform.py?ref=8b80d6556c43d3bd7c45d44cc2c0819368b2b37c",
"patch": "@@ -357,7 +357,7 @@ def initialize(self):\n def register_graph_pass(self, graph_pass):\n from ngraph.transformers.passes.nviz import VizPass\n if isinstance(graph_pass, VizPass):\n- self.hetr_passes.append(graph_pass)\n+ self.passes.append(graph_pass)\n else:\n raise RuntimeError(\"Unsupported Graph Pass for Hetr: {}\".format(graph_pass))\n "
}
] |
ngraph | 3373560f9075e10b8fba421f1465adfc96113dcd | b90381cedec82710135dcaedff292f2d2cb03f73 | flex_tests/test_flexew/test_flexew_basic_math.py | https://github.com/rsumner31/ngraph | true | false | false | @@ -30,7 +30,7 @@ test_data_single_operand = (
# template:(operation, operand, expected_result, description, is_list
# test_assign
- bug((op.pos, [63.99515752394789], [63.99921874284734], "Assign function - underflow expected")),
+ bug((op.pos, [MINIMUM_FLEX_VALUE - 2], [MINIMUM_FLEX_VALUE], "Assign function - underflow expected")),
bug((op.pos, [MAXIMUM_FLEX_VALUE + 1], [MAXIMUM_FLEX_VALUE], "Assign function - overflow expected")),
(op.pos, [MINIMUM_FLEX_VALUE], [MINIMUM_FLEX_VALUE], "Assign function of negative boundary value"),
(op.pos, [MAXIMUM_FLEX_VALUE], [MAXIMUM_FLEX_VALUE], "Assign function of positive boundary value"),
| bug ( ( op . pos , [ 63.99515752394789 ] , [ 63.99921874284734 ] , "Assign function - underflow expected" ) ) , | bug ( ( op . pos , [ MINIMUM_FLEX_VALUE - 2 ] , [ MINIMUM_FLEX_VALUE ] , "Assign function - underflow expected" ) ) , | SINGLE_STMT | [["Insert", ["list", 3, 18, 3, 37], ["binary_operator", "N0"], 1], ["Insert", ["list", 3, 39, 3, 58], ["identifier:MINIMUM_FLEX_VALUE", "T"], 1], ["Insert", "N0", ["identifier:MINIMUM_FLEX_VALUE", "T"], 0], ["Insert", "N0", ["-:-", "T"], 1], ["Insert", "N0", ["integer:2", "T"], 2], ["Delete", ["float:63.99515752394789", 3, 19, 3, 36]], ["Delete", ["float:63.99921874284734", 3, 40, 3, 57]]] | rsumner31/ngraph@3373560f9075e10b8fba421f1465adfc96113dcd | Flex EW basic math - fix broken test case | [
{
"sha": "04b786d1f1728c5abab5a9030f5d143f7322e5d8",
"filename": "flex_tests/test_flexew/test_flexew_basic_math.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/rsumner31/ngraph/blob/3373560f9075e10b8fba421f1465adfc96113dcd/flex_tests%2Ftest_flexew%2Ftest_flexew_basic_math.py",
"raw_url": "https://github.com/rsumner31/ngraph/raw/3373560f9075e10b8fba421f1465adfc96113dcd/flex_tests%2Ftest_flexew%2Ftest_flexew_basic_math.py",
"contents_url": "https://api.github.com/repos/rsumner31/ngraph/contents/flex_tests%2Ftest_flexew%2Ftest_flexew_basic_math.py?ref=3373560f9075e10b8fba421f1465adfc96113dcd",
"patch": "@@ -30,7 +30,7 @@\n # template:(operation, operand, expected_result, description, is_list\r\n \r\n # test_assign\r\n- bug((op.pos, [63.99515752394789], [63.99921874284734], \"Assign function - underflow expected\")),\r\n+ bug((op.pos, [MINIMUM_FLEX_VALUE - 2], [MINIMUM_FLEX_VALUE], \"Assign function - underflow expected\")),\r\n bug((op.pos, [MAXIMUM_FLEX_VALUE + 1], [MAXIMUM_FLEX_VALUE], \"Assign function - overflow expected\")),\r\n (op.pos, [MINIMUM_FLEX_VALUE], [MINIMUM_FLEX_VALUE], \"Assign function of negative boundary value\"),\r\n (op.pos, [MAXIMUM_FLEX_VALUE], [MAXIMUM_FLEX_VALUE], \"Assign function of positive boundary value\"),\r"
}
] |
GitPython | d83f6e84cbeb45dce4576a9a4591446afefa50b2 | a4b8e467e44bc1ca1ebf481ac2dfc1baaf9688dc | git/cmd.py | https://github.com/costypetrisor/GitPython | true | false | true | @@ -103,7 +103,7 @@ class Git(LazyMixin):
try:
os.kill(self.proc.pid, 2) # interrupt signal
self.proc.wait() # ensure process goes away
- except OSError:
+ except (OSError, WindowsError):
pass # ignore error when process already died
except AttributeError:
# try windows
| try : os . kill ( self . proc . pid , 2 ) self . proc . wait ( ) except OSError : pass except AttributeError : | try : os . kill ( self . proc . pid , 2 ) self . proc . wait ( ) except ( OSError , WindowsError ) : pass except AttributeError : | SINGLE_STMT | [["Insert", ["except_clause", 3, 13, 4, 63], ["tuple", "N0"], 1], ["Insert", "N0", ["(:(", "T"], 0], ["Move", "N0", ["identifier:OSError", 3, 20, 3, 27], 1], ["Insert", "N0", [",:,", "T"], 2], ["Insert", "N0", ["identifier:WindowsError", "T"], 3], ["Insert", "N0", ["):)", "T"], 4]] | costypetrisor/GitPython@d83f6e84cbeb45dce4576a9a4591446afefa50b2 | Make sure we ignore WindowsErrors too, in case the process is already dead
Fixes #140 | [
{
"sha": "ef370fe226ee6b7d1862b31fcf72cd2ba205a9e2",
"filename": "git/cmd.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/costypetrisor/GitPython/blob/d83f6e84cbeb45dce4576a9a4591446afefa50b2/git%2Fcmd.py",
"raw_url": "https://github.com/costypetrisor/GitPython/raw/d83f6e84cbeb45dce4576a9a4591446afefa50b2/git%2Fcmd.py",
"contents_url": "https://api.github.com/repos/costypetrisor/GitPython/contents/git%2Fcmd.py?ref=d83f6e84cbeb45dce4576a9a4591446afefa50b2",
"patch": "@@ -103,7 +103,7 @@ def __del__(self):\n try:\n os.kill(self.proc.pid, 2) # interrupt signal\n self.proc.wait() # ensure process goes away\n- except OSError:\n+ except (OSError, WindowsError):\n pass # ignore error when process already died\n except AttributeError:\n # try windows"
}
] |
GitPython | 28bda3aaa19955d1c172bd86d62478bee024bf7b | 4fd7b945dfca73caf00883d4cf43740edb7516df | git/objects/commit.py | https://github.com/costypetrisor/GitPython | true | false | true | @@ -358,7 +358,7 @@ class Commit(base.Object, Iterable, Diffable, Traversable, Serializable):
# as well ...
import git.refs
try:
- repo.head.set_commit(new_commit, logmsg="commit: %s" % message)
+ repo.head.set_commit(new_commit, logmsg=message)
except ValueError:
# head is not yet set to the ref our HEAD points to
# Happens on first commit
| repo . head . set_commit ( new_commit , logmsg = "commit: %s" % message ) | repo . head . set_commit ( new_commit , logmsg = message ) | SINGLE_STMT | [["Move", ["keyword_argument", 3, 50, 3, 79], ["identifier:message", 3, 72, 3, 79], 2], ["Delete", ["string:\"commit: %s\"", 3, 57, 3, 69]], ["Delete", ["%:%", 3, 70, 3, 71]], ["Delete", ["binary_operator", 3, 57, 3, 79]]] | costypetrisor/GitPython@28bda3aaa19955d1c172bd86d62478bee024bf7b | suppression des prefixes de commit | [
{
"sha": "f2ce91ca0ca22c09728640a04da08747989d6bd0",
"filename": "git/objects/commit.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/costypetrisor/GitPython/blob/28bda3aaa19955d1c172bd86d62478bee024bf7b/git%2Fobjects%2Fcommit.py",
"raw_url": "https://github.com/costypetrisor/GitPython/raw/28bda3aaa19955d1c172bd86d62478bee024bf7b/git%2Fobjects%2Fcommit.py",
"contents_url": "https://api.github.com/repos/costypetrisor/GitPython/contents/git%2Fobjects%2Fcommit.py?ref=28bda3aaa19955d1c172bd86d62478bee024bf7b",
"patch": "@@ -358,7 +358,7 @@ def create_from_tree(cls, repo, tree, message, parent_commits=None, head=False,\n # as well ...\n import git.refs\n try:\n- repo.head.set_commit(new_commit, logmsg=\"commit: %s\" % message)\n+ repo.head.set_commit(new_commit, logmsg=message)\n except ValueError:\n # head is not yet set to the ref our HEAD points to\n # Happens on first commit"
}
] |
GitPython | fc94b89dabd9df49631cbf6b18800325f3521864 | e40ad6369bc74d01af4dc41d3a9b8e25ac2aa01e | git/test/test_repo.py | https://github.com/costypetrisor/GitPython | true | false | true | @@ -620,7 +620,7 @@ class TestRepo(TestBase):
def test_repo_odbtype(self):
target_type = GitDB
- if sys.version_info[1] < 5:
+ if sys.version_info[:2] < (2, 5):
target_type = GitCmdObjectDB
assert isinstance(self.rorepo.odb, target_type)
| if sys . version_info [ 1 ] < 5 : target_type = GitCmdObjectDB | if sys . version_info [ : 2 ] < ( 2 , 5 ) : target_type = GitCmdObjectDB | SINGLE_STMT | [["Insert", ["comparison_operator", 3, 12, 3, 35], ["tuple", "N0"], 2], ["Insert", ["subscript", 3, 12, 3, 31], ["slice", "N1"], 2], ["Insert", "N0", ["(:(", "T"], 0], ["Insert", "N0", ["integer:2", "T"], 1], ["Insert", "N0", [",:,", "T"], 2], ["Move", "N0", ["integer:5", 3, 34, 3, 35], 3], ["Insert", "N0", ["):)", "T"], 4], ["Insert", "N1", [":::", "T"], 0], ["Insert", "N1", ["integer:2", "T"], 1], ["Delete", ["integer:1", 3, 29, 3, 30]]] | costypetrisor/GitPython@fc94b89dabd9df49631cbf6b18800325f3521864 | And finally, PY3 support should be restored.
Forgot to fix the test, which used the same broken version_info condition | [
{
"sha": "9d9f727f68b304c199ef2738afc56ce1674c0d6b",
"filename": "git/test/test_repo.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/costypetrisor/GitPython/blob/fc94b89dabd9df49631cbf6b18800325f3521864/git%2Ftest%2Ftest_repo.py",
"raw_url": "https://github.com/costypetrisor/GitPython/raw/fc94b89dabd9df49631cbf6b18800325f3521864/git%2Ftest%2Ftest_repo.py",
"contents_url": "https://api.github.com/repos/costypetrisor/GitPython/contents/git%2Ftest%2Ftest_repo.py?ref=fc94b89dabd9df49631cbf6b18800325f3521864",
"patch": "@@ -620,7 +620,7 @@ def test_rev_parse(self):\n \n def test_repo_odbtype(self):\n target_type = GitDB\n- if sys.version_info[1] < 5:\n+ if sys.version_info[:2] < (2, 5):\n target_type = GitCmdObjectDB\n assert isinstance(self.rorepo.odb, target_type)\n "
}
] |
GitPython | 1410bcc76725b50be794b385006dedd96bebf0fb | 06bec1bcd1795192f4a4a274096f053afc8f80ec | git/test/test_docs.py | https://github.com/costypetrisor/GitPython | true | false | true | @@ -431,7 +431,7 @@ class Tutorials(TestBase):
# [31-test_references_and_objects]
git = repo.git
- git.checkout('head', b="my_new_branch") # create a new branch
+ git.checkout('HEAD', b="my_new_branch") # create a new branch
git.branch('another-new-one')
git.branch('-D', 'another-new-one') # pass strings for full control over argument order
git.for_each_ref() # '-' becomes '_' when calling it
| git . checkout ( 'head' , b = "my_new_branch" ) | git . checkout ( 'HEAD' , b = "my_new_branch" ) | CHANGE_STRING_LITERAL | [["Update", ["string:'head'", 3, 22, 3, 28], "'HEAD'"]] | costypetrisor/GitPython@1410bcc76725b50be794b385006dedd96bebf0fb | This should finally fix travis ci | [
{
"sha": "586f0ce4a1acd8d0ae6538f15890616ec8c23b8a",
"filename": "git/test/test_docs.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/costypetrisor/GitPython/blob/1410bcc76725b50be794b385006dedd96bebf0fb/git%2Ftest%2Ftest_docs.py",
"raw_url": "https://github.com/costypetrisor/GitPython/raw/1410bcc76725b50be794b385006dedd96bebf0fb/git%2Ftest%2Ftest_docs.py",
"contents_url": "https://api.github.com/repos/costypetrisor/GitPython/contents/git%2Ftest%2Ftest_docs.py?ref=1410bcc76725b50be794b385006dedd96bebf0fb",
"patch": "@@ -431,7 +431,7 @@ def test_references_and_objects(self, rw_dir):\n \n # [31-test_references_and_objects]\n git = repo.git\n- git.checkout('head', b=\"my_new_branch\") # create a new branch\n+ git.checkout('HEAD', b=\"my_new_branch\") # create a new branch\n git.branch('another-new-one')\n git.branch('-D', 'another-new-one') # pass strings for full control over argument order\n git.for_each_ref() # '-' becomes '_' when calling it"
}
] |
GitPython | f498de9bfd67bcbb42d36dfb8ff9e59ec788825b | 4df4159413a4bf30a891f21cd69202e8746c8fea | git/remote.py | https://github.com/costypetrisor/GitPython | true | false | true | @@ -517,7 +517,7 @@ class Remote(LazyMixin, Iterable):
- self.repo.git.remote("update", self.name)
+ self.repo.git.remote("update", self.name, **kwargs)
return self
def _get_fetch_info_from_stderr(self, proc, progress):
| self . repo . git . remote ( "update" , self . name ) | self . repo . git . remote ( "update" , self . name , ** kwargs ) | SAME_FUNCTION_MORE_ARGS | [["Insert", ["argument_list", 0, 29, 0, 50], [",:,", "T"], 4], ["Insert", ["argument_list", 0, 29, 0, 50], ["dictionary_splat", "N0"], 5], ["Insert", "N0", ["**:**", "T"], 0], ["Insert", "N0", ["identifier:kwargs", "T"], 1]] | costypetrisor/GitPython@f498de9bfd67bcbb42d36dfb8ff9e59ec788825b | Remote.update() didn't pass kwargs along to git command.
Fixes #250 | [
{
"sha": "2267c2035cc8d87537ad0eb34cbc658bbe45916c",
"filename": "git/remote.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/costypetrisor/GitPython/blob/f498de9bfd67bcbb42d36dfb8ff9e59ec788825b/git%2Fremote.py",
"raw_url": "https://github.com/costypetrisor/GitPython/raw/f498de9bfd67bcbb42d36dfb8ff9e59ec788825b/git%2Fremote.py",
"contents_url": "https://api.github.com/repos/costypetrisor/GitPython/contents/git%2Fremote.py?ref=f498de9bfd67bcbb42d36dfb8ff9e59ec788825b",
"patch": "@@ -517,7 +517,7 @@ def update(self, **kwargs):\n Additional arguments passed to git-remote update\n \n :return: self \"\"\"\n- self.repo.git.remote(\"update\", self.name)\n+ self.repo.git.remote(\"update\", self.name, **kwargs)\n return self\n \n def _get_fetch_info_from_stderr(self, proc, progress):"
}
] |
GitPython | d8bbfea4cdcb36ce0e9ee7d7cad4c41096d4d54f | 91562247e0d11d28b4bc6d85ba50b7af2bd7224b | doc/source/conf.py | https://github.com/costypetrisor/GitPython | true | false | false | @@ -43,7 +43,7 @@ master_doc = 'index'
# General information about the project.
project = u'GitPython'
-copyright = u'Copyright (C) 2008, 2009 Michael Trier and contributors, 2010 Sebastian Thiel'
+copyright = u'Copyright (C) 2008, 2009 Michael Trier and contributors, 2010-2015 Sebastian Thiel'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
| copyright = u'Copyright (C) 2008, 2009 Michael Trier and contributors, 2010 Sebastian Thiel' | copyright = u'Copyright (C) 2008, 2009 Michael Trier and contributors, 2010-2015 Sebastian Thiel' | CHANGE_STRING_LITERAL | [["Update", ["string:u'Copyright (C) 2008, 2009 Michael Trier and contributors, 2010 Sebastian Thiel'", 3, 13, 3, 93], "u'Copyright (C) 2008, 2009 Michael Trier and contributors, 2010-2015 Sebastian Thiel'"]] | costypetrisor/GitPython@d8bbfea4cdcb36ce0e9ee7d7cad4c41096d4d54f | Updated copyright information.
Fixes #246 | [
{
"sha": "f86f08ac8f3d045f94092c530c76a3a258b56c5f",
"filename": "doc/source/conf.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/costypetrisor/GitPython/blob/d8bbfea4cdcb36ce0e9ee7d7cad4c41096d4d54f/doc%2Fsource%2Fconf.py",
"raw_url": "https://github.com/costypetrisor/GitPython/raw/d8bbfea4cdcb36ce0e9ee7d7cad4c41096d4d54f/doc%2Fsource%2Fconf.py",
"contents_url": "https://api.github.com/repos/costypetrisor/GitPython/contents/doc%2Fsource%2Fconf.py?ref=d8bbfea4cdcb36ce0e9ee7d7cad4c41096d4d54f",
"patch": "@@ -43,7 +43,7 @@\n \n # General information about the project.\n project = u'GitPython'\n-copyright = u'Copyright (C) 2008, 2009 Michael Trier and contributors, 2010 Sebastian Thiel'\n+copyright = u'Copyright (C) 2008, 2009 Michael Trier and contributors, 2010-2015 Sebastian Thiel'\n \n # The version info for the project you're documenting, acts as replacement for\n # |version| and |release|, also used in various other places throughout the"
}
] |
GitPython | 6d83f44007c5c581eae7ddc6c5de33311b7c1895 | f9e7a3d93da741f81a5af2e84422376c54f1f337 | git/util.py | https://github.com/costypetrisor/GitPython | true | false | false | @@ -164,7 +164,7 @@ class RemoteProgress(object):
- _num_op_codes = 7
+ _num_op_codes = 8
BEGIN, END, COUNTING, COMPRESSING, WRITING, RECEIVING, RESOLVING, FINDING_SOURCES = [1 << x for x in range(_num_op_codes)]
STAGE_MASK = BEGIN | END
OP_MASK = ~STAGE_MASK
| _num_op_codes = 7 | _num_op_codes = 8 | CHANGE_NUMERIC_LITERAL | [["Update", ["integer:7", 0, 21, 0, 22], "8"]] | costypetrisor/GitPython@6d83f44007c5c581eae7ddc6c5de33311b7c1895 | fix(util): Correct number of op codes
The previous patch failed to update the expected number of op_codes,
which would result in an exception when creating an instance of
RemoteProgress. This patch corrects the value to the new expected number
of op_codes (8) | [
{
"sha": "ec605b0b410af7d2db33e1b15e09755d75fb8f84",
"filename": "git/util.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/costypetrisor/GitPython/blob/6d83f44007c5c581eae7ddc6c5de33311b7c1895/git%2Futil.py",
"raw_url": "https://github.com/costypetrisor/GitPython/raw/6d83f44007c5c581eae7ddc6c5de33311b7c1895/git%2Futil.py",
"contents_url": "https://api.github.com/repos/costypetrisor/GitPython/contents/git%2Futil.py?ref=6d83f44007c5c581eae7ddc6c5de33311b7c1895",
"patch": "@@ -164,7 +164,7 @@ class RemoteProgress(object):\n Handler providing an interface to parse progress information emitted by git-push\n and git-fetch and to dispatch callbacks allowing subclasses to react to the progress.\n \"\"\"\n- _num_op_codes = 7\n+ _num_op_codes = 8\n BEGIN, END, COUNTING, COMPRESSING, WRITING, RECEIVING, RESOLVING, FINDING_SOURCES = [1 << x for x in range(_num_op_codes)]\n STAGE_MASK = BEGIN | END\n OP_MASK = ~STAGE_MASK"
}
] |
GitPython | abd23a37d8b93721c0e58e8c133cef26ed5ba1f0 | b89b089972b5bac824ac3de67b8a02097e7e95d7 | git/test/test_docs.py | https://github.com/costypetrisor/GitPython | true | false | true | @@ -94,7 +94,7 @@ class Tutorials(TestBase):
# [11-test_init_repo_object]
assert now.commit.message != past.commit.message
# You can read objects directly through binary streams, no working tree required
- assert (now.commit.tree / 'VERSION').data_stream.read().decode('ascii').startswith('0')
+ assert (now.commit.tree / 'VERSION').data_stream.read().decode('ascii').startswith('1')
# You can traverse trees as well to handle all contained files of a particular commit
file_count = 0
| assert ( now . commit . tree / 'VERSION' ) . data_stream . read ( ) . decode ( 'ascii' ) . startswith ( '0' ) | assert ( now . commit . tree / 'VERSION' ) . data_stream . read ( ) . decode ( 'ascii' ) . startswith ( '1' ) | CHANGE_STRING_LITERAL | [["Update", ["string:'0'", 3, 92, 3, 95], "'1'"]] | costypetrisor/GitPython@abd23a37d8b93721c0e58e8c133cef26ed5ba1f0 | fix(test_docs): we are at major version 1 now
It expected to see major version 0 though. | [
{
"sha": "5b8aa8179a41c261e14c0dd9c2227fd14f2d312f",
"filename": "git/test/test_docs.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/costypetrisor/GitPython/blob/abd23a37d8b93721c0e58e8c133cef26ed5ba1f0/git%2Ftest%2Ftest_docs.py",
"raw_url": "https://github.com/costypetrisor/GitPython/raw/abd23a37d8b93721c0e58e8c133cef26ed5ba1f0/git%2Ftest%2Ftest_docs.py",
"contents_url": "https://api.github.com/repos/costypetrisor/GitPython/contents/git%2Ftest%2Ftest_docs.py?ref=abd23a37d8b93721c0e58e8c133cef26ed5ba1f0",
"patch": "@@ -94,7 +94,7 @@ def test_init_repo_object(self, rw_dir):\n # [11-test_init_repo_object]\n assert now.commit.message != past.commit.message\n # You can read objects directly through binary streams, no working tree required\n- assert (now.commit.tree / 'VERSION').data_stream.read().decode('ascii').startswith('0')\n+ assert (now.commit.tree / 'VERSION').data_stream.read().decode('ascii').startswith('1')\n \n # You can traverse trees as well to handle all contained files of a particular commit\n file_count = 0"
}
] |
GitPython | 9563d27fbde02b8b2a8b0d808759cb235b4e083b | 2c594195eb614a200e1abb85706ec7b8b7c91268 | git/objects/commit.py | https://github.com/costypetrisor/GitPython | true | false | true | @@ -445,7 +445,7 @@ class Commit(base.Object, Iterable, Diffable, Traversable, Serializable):
next_line = readline()
while next_line.startswith(b'mergetag '):
next_line = readline()
- while next_line.startswith(' '):
+ while next_line.startswith(b' '):
next_line = readline()
# end skip mergetags
| while next_line . startswith ( ' ' ) : next_line = readline ( ) | while next_line . startswith ( b' ' ) : next_line = readline ( ) | CHANGE_STRING_LITERAL | [["Update", ["string:' '", 3, 40, 3, 43], "b' '"]] | costypetrisor/GitPython@9563d27fbde02b8b2a8b0d808759cb235b4e083b | Fix type error (startswith expects bytes) | [
{
"sha": "ac381cd93e190e6616106ac597ae941b8564f14e",
"filename": "git/objects/commit.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/costypetrisor/GitPython/blob/9563d27fbde02b8b2a8b0d808759cb235b4e083b/git%2Fobjects%2Fcommit.py",
"raw_url": "https://github.com/costypetrisor/GitPython/raw/9563d27fbde02b8b2a8b0d808759cb235b4e083b/git%2Fobjects%2Fcommit.py",
"contents_url": "https://api.github.com/repos/costypetrisor/GitPython/contents/git%2Fobjects%2Fcommit.py?ref=9563d27fbde02b8b2a8b0d808759cb235b4e083b",
"patch": "@@ -445,7 +445,7 @@ def _deserialize(self, stream):\n next_line = readline()\n while next_line.startswith(b'mergetag '):\n next_line = readline()\n- while next_line.startswith(' '):\n+ while next_line.startswith(b' '):\n next_line = readline()\n # end skip mergetags\n "
}
] |
GitPython | 3e79604c8bdfc367f10a4a522c9bf548bdb3ab9a | 14851034ab5204ddb7329eb34bb0964d3f206f2b | git/remote.py | https://github.com/costypetrisor/GitPython | true | false | true | @@ -555,7 +555,7 @@ class Remote(LazyMixin, Iterable):
line = line.decode(defenc)
line = line.rstrip()
for pline in progress_handler(line):
- if line.startswith('fatal:'):
+ if line.startswith('fatal:') or line.startswith('error:'):
raise GitCommandError(("Error when fetching: %s" % line,), 2)
# END handle special messages
for cmd in cmds:
| if line . startswith ( 'fatal:' ) : raise GitCommandError ( ( "Error when fetching: %s" % line , ) , 2 ) | if line . startswith ( 'fatal:' ) or line . startswith ( 'error:' ) : raise GitCommandError ( ( "Error when fetching: %s" % line , ) , 2 ) | LESS_SPECIFIC_IF | [["Insert", ["if_statement", 3, 17, 4, 82], ["boolean_operator", "N0"], 1], ["Move", "N0", ["call", 3, 20, 3, 45], 0], ["Insert", "N0", ["or:or", "T"], 1], ["Insert", "N0", ["call", "N1"], 2], ["Insert", "N1", ["attribute", "N2"], 0], ["Insert", "N1", ["argument_list", "N3"], 1], ["Insert", "N2", ["identifier:line", "T"], 0], ["Insert", "N2", [".:.", "T"], 1], ["Insert", "N2", ["identifier:startswith", "T"], 2], ["Insert", "N3", ["(:(", "T"], 0], ["Insert", "N3", ["string:'error:'", "T"], 1], ["Insert", "N3", ["):)", "T"], 2]] | costypetrisor/GitPython@3e79604c8bdfc367f10a4a522c9bf548bdb3ab9a | While parsing errors, also detecting lines starting with error: | [
{
"sha": "485e1445db3de3efb2c1547a91d25075fd610799",
"filename": "git/remote.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/costypetrisor/GitPython/blob/3e79604c8bdfc367f10a4a522c9bf548bdb3ab9a/git%2Fremote.py",
"raw_url": "https://github.com/costypetrisor/GitPython/raw/3e79604c8bdfc367f10a4a522c9bf548bdb3ab9a/git%2Fremote.py",
"contents_url": "https://api.github.com/repos/costypetrisor/GitPython/contents/git%2Fremote.py?ref=3e79604c8bdfc367f10a4a522c9bf548bdb3ab9a",
"patch": "@@ -555,7 +555,7 @@ def _get_fetch_info_from_stderr(self, proc, progress):\n line = line.decode(defenc)\n line = line.rstrip()\n for pline in progress_handler(line):\n- if line.startswith('fatal:'):\n+ if line.startswith('fatal:') or line.startswith('error:'):\n raise GitCommandError((\"Error when fetching: %s\" % line,), 2)\n # END handle special messages\n for cmd in cmds:"
}
] |
GitPython | bbf04348b0c79be2103fd3aaa746685578eb12fd | 9db24bc7a617cf93321bb60de6af2a20efd6afc1 | git/test/test_git.py | https://github.com/costypetrisor/GitPython | true | false | true | @@ -201,7 +201,7 @@ class TestGit(TestBase):
try:
remote.fetch()
except GitCommandError as err:
- if sys.version_info[0] < 3:
+ if sys.version_info[0] < 3 and sys.platform == 'darwin':
assert 'ssh-origin' in str(err)
assert err.status == 128
else:
| if sys . version_info [ 0 ] < 3 : assert 'ssh-origin' in str ( err ) assert err . status == 128 else : | if sys . version_info [ 0 ] < 3 and sys . platform == 'darwin' : assert 'ssh-origin' in str ( err ) assert err . status == 128 else : | MORE_SPECIFIC_IF | [["Insert", ["if_statement", 3, 21, 6, 26], ["boolean_operator", "N0"], 1], ["Move", "N0", ["comparison_operator", 3, 24, 3, 47], 0], ["Insert", "N0", ["and:and", "T"], 1], ["Insert", "N0", ["comparison_operator", "N1"], 2], ["Insert", "N1", ["attribute", "N2"], 0], ["Insert", "N1", ["==:==", "T"], 1], ["Insert", "N1", ["string:'darwin'", "T"], 2], ["Insert", "N2", ["identifier:sys", "T"], 0], ["Insert", "N2", [".:.", "T"], 1], ["Insert", "N2", ["identifier:platform", "T"], 2]] | costypetrisor/GitPython@bbf04348b0c79be2103fd3aaa746685578eb12fd | fix(travis): get py2.6 to work
Seems like OSX is somewhat special here ... . | [
{
"sha": "f386150f57b8142f28635089c8d810400f6e192c",
"filename": "git/test/test_git.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/costypetrisor/GitPython/blob/bbf04348b0c79be2103fd3aaa746685578eb12fd/git%2Ftest%2Ftest_git.py",
"raw_url": "https://github.com/costypetrisor/GitPython/raw/bbf04348b0c79be2103fd3aaa746685578eb12fd/git%2Ftest%2Ftest_git.py",
"contents_url": "https://api.github.com/repos/costypetrisor/GitPython/contents/git%2Ftest%2Ftest_git.py?ref=bbf04348b0c79be2103fd3aaa746685578eb12fd",
"patch": "@@ -201,7 +201,7 @@ def test_environment(self, rw_dir):\n try:\n remote.fetch()\n except GitCommandError as err:\n- if sys.version_info[0] < 3:\n+ if sys.version_info[0] < 3 and sys.platform == 'darwin':\n assert 'ssh-origin' in str(err)\n assert err.status == 128\n else:"
}
] |
GitPython | 1578baf817c2526d29276067d2f23d28b6fab2b1 | 80d43111b6bb73008683ad2f5a7c6abbab3c74ed | git/config.py | https://github.com/costypetrisor/GitPython | true | false | true | @@ -386,7 +386,7 @@ class GitConfigParser(with_metaclass(MetaParserBuilder, cp.RawConfigParser, obje
# We expect all paths to be normalized and absolute (and will assure that is the case)
if self._has_includes():
for _, include_path in self.items('include'):
- if '~' in include_path:
+ if include_path.startswith('~'):
include_path = os.path.expanduser(include_path)
if not os.path.isabs(include_path):
if not close_fp:
| if '~' in include_path : include_path = os . path . expanduser ( include_path ) | if include_path . startswith ( '~' ) : include_path = os . path . expanduser ( include_path ) | SINGLE_STMT | [["Insert", ["if_statement", 3, 21, 4, 72], ["call", "N0"], 1], ["Insert", "N0", ["attribute", "N1"], 0], ["Insert", "N0", ["argument_list", "N2"], 1], ["Insert", "N1", ["identifier:include_path", "T"], 0], ["Insert", "N1", [".:.", "T"], 1], ["Update", ["identifier:include_path", 3, 31, 3, 43], "startswith"], ["Move", "N1", ["identifier:include_path", 3, 31, 3, 43], 2], ["Insert", "N2", ["(:(", "T"], 0], ["Insert", "N2", ["string:'~'", "T"], 1], ["Insert", "N2", ["):)", "T"], 2], ["Delete", ["string:'~'", 3, 24, 3, 27]], ["Delete", ["in:in", 3, 28, 3, 30]], ["Delete", ["comparison_operator", 3, 24, 3, 43]]] | costypetrisor/GitPython@1578baf817c2526d29276067d2f23d28b6fab2b1 | fix(config): use `str.startswith('~')` instead of `'~' in str` | [
{
"sha": "b7ddf0d227d6f581e5ccd4abe417f6c221c1655c",
"filename": "git/config.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/costypetrisor/GitPython/blob/1578baf817c2526d29276067d2f23d28b6fab2b1/git%2Fconfig.py",
"raw_url": "https://github.com/costypetrisor/GitPython/raw/1578baf817c2526d29276067d2f23d28b6fab2b1/git%2Fconfig.py",
"contents_url": "https://api.github.com/repos/costypetrisor/GitPython/contents/git%2Fconfig.py?ref=1578baf817c2526d29276067d2f23d28b6fab2b1",
"patch": "@@ -386,7 +386,7 @@ def read(self):\n # We expect all paths to be normalized and absolute (and will assure that is the case)\n if self._has_includes():\n for _, include_path in self.items('include'):\n- if '~' in include_path:\n+ if include_path.startswith('~'):\n include_path = os.path.expanduser(include_path)\n if not os.path.isabs(include_path):\n if not close_fp:"
}
] |
GitPython | 9aaaa83c44d5d23565e982a705d483c656e6c157 | c5e4334f38dce4cf02db5f11a6e5844f3a7c785c | git/repo/fun.py | https://github.com/costypetrisor/GitPython | true | false | true | @@ -121,7 +121,7 @@ def name_to_object(repo, name, return_ref=False):
def deref_tag(tag):
- """Recursively dereerence a tag and return the resulting object"""
+ """Recursively dereference a tag and return the resulting object"""
while True:
try:
tag = tag.object
| """Recursively dereerence a tag and return the resulting object""" | """Recursively dereference a tag and return the resulting object""" | CHANGE_STRING_LITERAL | [["Update", ["string:\"\"\"Recursively dereerence a tag and return the resulting object\"\"\"", 3, 5, 3, 71], "\"\"\"Recursively dereference a tag and return the resulting object\"\"\""]] | costypetrisor/GitPython@9aaaa83c44d5d23565e982a705d483c656e6c157 | Fix typo | [
{
"sha": "049800b932e6f90082ea7e598968ec3244d38e3c",
"filename": "git/repo/fun.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/costypetrisor/GitPython/blob/9aaaa83c44d5d23565e982a705d483c656e6c157/git%2Frepo%2Ffun.py",
"raw_url": "https://github.com/costypetrisor/GitPython/raw/9aaaa83c44d5d23565e982a705d483c656e6c157/git%2Frepo%2Ffun.py",
"contents_url": "https://api.github.com/repos/costypetrisor/GitPython/contents/git%2Frepo%2Ffun.py?ref=9aaaa83c44d5d23565e982a705d483c656e6c157",
"patch": "@@ -121,7 +121,7 @@ def name_to_object(repo, name, return_ref=False):\n \n \n def deref_tag(tag):\n- \"\"\"Recursively dereerence a tag and return the resulting object\"\"\"\n+ \"\"\"Recursively dereference a tag and return the resulting object\"\"\"\n while True:\n try:\n tag = tag.object"
}
] |
GitPython | c1d33021feb7324e0f2f91c947468bf282f036d2 | 3c8a33e2c9cae8deef1770a5fce85acb2e85b5c6 | git/index/base.py | https://github.com/costypetrisor/GitPython | true | false | true | @@ -610,7 +610,7 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable):
blob = Blob(self.repo, Blob.NULL_BIN_SHA,
stat_mode_to_index_mode(os.stat(abspath).st_mode),
- to_native_path_linux(gitrelative_path), encoding=defenc)
+ to_native_path_linux(gitrelative_path))
# TODO: variable undefined
entries.append(BaseIndexEntry.from_blob(blob))
# END for each path
| blob = Blob ( self . repo , Blob . NULL_BIN_SHA , stat_mode_to_index_mode ( os . stat ( abspath ) . st_mode ) , to_native_path_linux ( gitrelative_path ) , encoding = defenc ) | blob = Blob ( self . repo , Blob . NULL_BIN_SHA , stat_mode_to_index_mode ( os . stat ( abspath ) . st_mode ) , to_native_path_linux ( gitrelative_path ) ) | SAME_FUNCTION_LESS_ARGS | [["Delete", [",:,", 3, 67, 3, 68]], ["Delete", ["identifier:encoding", 3, 69, 3, 77]], ["Delete", ["=:=", 3, 77, 3, 78]], ["Delete", ["identifier:defenc", 3, 78, 3, 84]], ["Delete", ["keyword_argument", 3, 69, 3, 84]]] | costypetrisor/GitPython@c1d33021feb7324e0f2f91c947468bf282f036d2 | fix(index): remove invalid keyword argument
It was a left-over of some prior hacking that was not removed by
accident. | [
{
"sha": "753fa4ae29cdb230f9d376350f5fc2beeae701f1",
"filename": "git/index/base.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/costypetrisor/GitPython/blob/c1d33021feb7324e0f2f91c947468bf282f036d2/git%2Findex%2Fbase.py",
"raw_url": "https://github.com/costypetrisor/GitPython/raw/c1d33021feb7324e0f2f91c947468bf282f036d2/git%2Findex%2Fbase.py",
"contents_url": "https://api.github.com/repos/costypetrisor/GitPython/contents/git%2Findex%2Fbase.py?ref=c1d33021feb7324e0f2f91c947468bf282f036d2",
"patch": "@@ -610,7 +610,7 @@ def _entries_for_paths(self, paths, path_rewriter, fprogress, entries):\n \n blob = Blob(self.repo, Blob.NULL_BIN_SHA,\n stat_mode_to_index_mode(os.stat(abspath).st_mode),\n- to_native_path_linux(gitrelative_path), encoding=defenc)\n+ to_native_path_linux(gitrelative_path))\n # TODO: variable undefined\n entries.append(BaseIndexEntry.from_blob(blob))\n # END for each path"
}
] |
GitPython | 039e265819cc6e5241907f1be30d2510bfa5ca6c | a0acb2229e1ebb59ab343e266fc5c1cc392a974e | git/test/test_submodule.py | https://github.com/costypetrisor/GitPython | true | false | true | @@ -697,7 +697,7 @@ class TestSubmodule(TestBase):
# submodules are retrieved from the current commit's tree, therefore we can't really get a new submodule
# object pointing to the new submodule commit
- sm_too = parent.submodules[0]
+ sm_too = parent.submodules['module_moved']
assert parent.head.commit.tree[sm.path].binsha == sm.binsha
assert sm_too.binsha == sm.binsha, "cached submodule should point to the same commit as updated one"
| sm_too = parent . submodules [ 0 ] | sm_too = parent . submodules [ 'module_moved' ] | SINGLE_TOKEN | [["Insert", ["subscript", 3, 18, 3, 38], ["string:'module_moved'", "T"], 2], ["Delete", ["integer:0", 3, 36, 3, 37]]] | costypetrisor/GitPython@039e265819cc6e5241907f1be30d2510bfa5ca6c | fix(tests): remove dependency on sort order
Now we select the submodule by name, not by index. The latter is not
deterministic.
Closes #335 | [
{
"sha": "17ce605a48264fa857bb86922dc565eb231f1a09",
"filename": "git/test/test_submodule.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/costypetrisor/GitPython/blob/039e265819cc6e5241907f1be30d2510bfa5ca6c/git%2Ftest%2Ftest_submodule.py",
"raw_url": "https://github.com/costypetrisor/GitPython/raw/039e265819cc6e5241907f1be30d2510bfa5ca6c/git%2Ftest%2Ftest_submodule.py",
"contents_url": "https://api.github.com/repos/costypetrisor/GitPython/contents/git%2Ftest%2Ftest_submodule.py?ref=039e265819cc6e5241907f1be30d2510bfa5ca6c",
"patch": "@@ -697,7 +697,7 @@ def test_git_submodules_and_add_sm_with_new_commit(self, rwdir):\n \n # submodules are retrieved from the current commit's tree, therefore we can't really get a new submodule\n # object pointing to the new submodule commit\n- sm_too = parent.submodules[0]\n+ sm_too = parent.submodules['module_moved']\n assert parent.head.commit.tree[sm.path].binsha == sm.binsha\n assert sm_too.binsha == sm.binsha, \"cached submodule should point to the same commit as updated one\"\n "
}
] |
GitPython | 332521ac1d94f743b06273e6a8daf91ce93aed7d | 8324c4b38cf37af416833d36696577d8d35dce7f | git/cmd.py | https://github.com/costypetrisor/GitPython | true | false | true | @@ -700,7 +700,7 @@ class Git(LazyMixin):
finally:
self.update_environment(**old_env)
- def transform_kwargs(self, split_single_char_options=False, **kwargs):
+ def transform_kwargs(self, split_single_char_options=True, **kwargs):
"""Transforms Python style kwargs into git command line options."""
args = list()
for k, v in kwargs.items():
| def transform_kwargs ( self , split_single_char_options = False , ** kwargs ) : """Transforms Python style kwargs into git command line options.""" args = list ( ) for k , v in kwargs . items ( ) : | def transform_kwargs ( self , split_single_char_options = True , ** kwargs ) : """Transforms Python style kwargs into git command line options.""" args = list ( ) for k , v in kwargs . items ( ) : | CHANGE_BOOLEAN_LITERAL | [["Insert", ["default_parameter", 3, 32, 3, 63], ["true:True", "T"], 2], ["Delete", ["false:False", 3, 58, 3, 63]]] | costypetrisor/GitPython@332521ac1d94f743b06273e6a8daf91ce93aed7d | fix(cmd): make short options with arguments become two separate arguments for the executable. | [
{
"sha": "3cdc68ab7fca8d889f7600764e2da234c9c3509d",
"filename": "git/cmd.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/costypetrisor/GitPython/blob/332521ac1d94f743b06273e6a8daf91ce93aed7d/git%2Fcmd.py",
"raw_url": "https://github.com/costypetrisor/GitPython/raw/332521ac1d94f743b06273e6a8daf91ce93aed7d/git%2Fcmd.py",
"contents_url": "https://api.github.com/repos/costypetrisor/GitPython/contents/git%2Fcmd.py?ref=332521ac1d94f743b06273e6a8daf91ce93aed7d",
"patch": "@@ -700,7 +700,7 @@ def custom_environment(self, **kwargs):\n finally:\n self.update_environment(**old_env)\n \n- def transform_kwargs(self, split_single_char_options=False, **kwargs):\n+ def transform_kwargs(self, split_single_char_options=True, **kwargs):\n \"\"\"Transforms Python style kwargs into git command line options.\"\"\"\n args = list()\n for k, v in kwargs.items():"
}
] |
GitPython | ec15e53439d228ec64cb260e02aeae5cc05c5b2b | 332521ac1d94f743b06273e6a8daf91ce93aed7d | git/test/test_git.py | https://github.com/costypetrisor/GitPython | true | false | true | @@ -65,7 +65,7 @@ class TestGit(TestBase):
def test_it_transforms_kwargs_into_git_command_arguments(self):
assert_equal(["-s"], self.git.transform_kwargs(**{'s': True}))
- assert_equal(["-s5"], self.git.transform_kwargs(**{'s': 5}))
+ assert_equal(["-s", "5"], self.git.transform_kwargs(**{'s': 5}))
assert_equal(["--max-count"], self.git.transform_kwargs(**{'max_count': True}))
assert_equal(["--max-count=5"], self.git.transform_kwargs(**{'max_count': 5}))
| assert_equal ( [ "-s5" ] , self . git . transform_kwargs ( ** { 's' : 5 } ) ) | assert_equal ( [ "-s" , "5" ] , self . git . transform_kwargs ( ** { 's' : 5 } ) ) | SINGLE_STMT | [["Update", ["string:\"-s5\"", 3, 23, 3, 28], "\"-s\""], ["Insert", ["list", 3, 22, 3, 29], [",:,", "T"], 2], ["Insert", ["list", 3, 22, 3, 29], ["string:\"5\"", "T"], 3]] | costypetrisor/GitPython@ec15e53439d228ec64cb260e02aeae5cc05c5b2b | fix(test): update to changes. | [
{
"sha": "3e3e21e4826cd38902f0c1a2fe5a07471a4cfe1d",
"filename": "git/test/test_git.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/costypetrisor/GitPython/blob/ec15e53439d228ec64cb260e02aeae5cc05c5b2b/git%2Ftest%2Ftest_git.py",
"raw_url": "https://github.com/costypetrisor/GitPython/raw/ec15e53439d228ec64cb260e02aeae5cc05c5b2b/git%2Ftest%2Ftest_git.py",
"contents_url": "https://api.github.com/repos/costypetrisor/GitPython/contents/git%2Ftest%2Ftest_git.py?ref=ec15e53439d228ec64cb260e02aeae5cc05c5b2b",
"patch": "@@ -65,7 +65,7 @@ def test_it_raises_errors(self):\n \n def test_it_transforms_kwargs_into_git_command_arguments(self):\n assert_equal([\"-s\"], self.git.transform_kwargs(**{'s': True}))\n- assert_equal([\"-s5\"], self.git.transform_kwargs(**{'s': 5}))\n+ assert_equal([\"-s\", \"5\"], self.git.transform_kwargs(**{'s': 5}))\n \n assert_equal([\"--max-count\"], self.git.transform_kwargs(**{'max_count': True}))\n assert_equal([\"--max-count=5\"], self.git.transform_kwargs(**{'max_count': 5}))"
}
] |
GitPython | 84fcf8e90fd41f93d77dd00bf1bc2ffc647340f2 | 074842accb51b2a0c2c1193018d9f374ac5e948f | git/remote.py | https://github.com/costypetrisor/GitPython | true | false | true | @@ -388,7 +388,7 @@ class Remote(LazyMixin, Iterable):
if attr == "_config_reader":
# NOTE: This is cached as __getattr__ is overridden to return remote config values implicitly, such as
# in print(r.pushurl)
- self._config_reader = SectionConstraint(self.repo.config_reader(), self._config_section_name())
+ self._config_reader = SectionConstraint(self.repo.config_reader("repository"), self._config_section_name())
else:
super(Remote, self)._set_cache_(attr)
| self . _config_reader = SectionConstraint ( self . repo . config_reader ( ) , self . _config_section_name ( ) ) | self . _config_reader = SectionConstraint ( self . repo . config_reader ( "repository" ) , self . _config_section_name ( ) ) | SAME_FUNCTION_MORE_ARGS | [["Insert", ["argument_list", 3, 76, 3, 78], ["string:\"repository\"", "T"], 1]] | costypetrisor/GitPython@84fcf8e90fd41f93d77dd00bf1bc2ffc647340f2 | fix(remote): assure only repository configuration
Previously it was possible for it to pick up non-repository
branch configuration, even though it was unlikely.
Closes #350 | [
{
"sha": "9bff50275704b62d74278da51f5865b9e903d29e",
"filename": "git/remote.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/costypetrisor/GitPython/blob/84fcf8e90fd41f93d77dd00bf1bc2ffc647340f2/git%2Fremote.py",
"raw_url": "https://github.com/costypetrisor/GitPython/raw/84fcf8e90fd41f93d77dd00bf1bc2ffc647340f2/git%2Fremote.py",
"contents_url": "https://api.github.com/repos/costypetrisor/GitPython/contents/git%2Fremote.py?ref=84fcf8e90fd41f93d77dd00bf1bc2ffc647340f2",
"patch": "@@ -388,7 +388,7 @@ def _set_cache_(self, attr):\n if attr == \"_config_reader\":\n # NOTE: This is cached as __getattr__ is overridden to return remote config values implicitly, such as\n # in print(r.pushurl)\n- self._config_reader = SectionConstraint(self.repo.config_reader(), self._config_section_name())\n+ self._config_reader = SectionConstraint(self.repo.config_reader(\"repository\"), self._config_section_name())\n else:\n super(Remote, self)._set_cache_(attr)\n "
}
] |
GitPython | ad3931357e5bb01941b50482b4b53934c0b715e3 | 41556dac4ca83477620305273a166e7d5d9f7199 | git/test/test_refs.py | https://github.com/costypetrisor/GitPython | true | false | true | @@ -275,7 +275,7 @@ class TestRefs(TestBase):
self.failUnlessRaises(TypeError, RemoteReference.create, rw_repo, "some_name")
# tag ref
- tag_name = "1.0.2"
+ tag_name = "5.0.2"
light_tag = TagReference.create(rw_repo, tag_name)
self.failUnlessRaises(GitCommandError, TagReference.create, rw_repo, tag_name)
light_tag = TagReference.create(rw_repo, tag_name, "HEAD~1", force=True)
| tag_name = "1.0.2" | tag_name = "5.0.2" | CHANGE_STRING_LITERAL | [["Update", ["string:\"1.0.2\"", 3, 20, 3, 27], "\"5.0.2\""]] | costypetrisor/GitPython@ad3931357e5bb01941b50482b4b53934c0b715e3 | fix(refs): set fixture different version | [
{
"sha": "b75b967bf36da8fc35bac1ddf794d5bd8fde5890",
"filename": "git/test/test_refs.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/costypetrisor/GitPython/blob/ad3931357e5bb01941b50482b4b53934c0b715e3/git%2Ftest%2Ftest_refs.py",
"raw_url": "https://github.com/costypetrisor/GitPython/raw/ad3931357e5bb01941b50482b4b53934c0b715e3/git%2Ftest%2Ftest_refs.py",
"contents_url": "https://api.github.com/repos/costypetrisor/GitPython/contents/git%2Ftest%2Ftest_refs.py?ref=ad3931357e5bb01941b50482b4b53934c0b715e3",
"patch": "@@ -275,7 +275,7 @@ def test_head_reset(self, rw_repo):\n self.failUnlessRaises(TypeError, RemoteReference.create, rw_repo, \"some_name\")\n \n # tag ref\n- tag_name = \"1.0.2\"\n+ tag_name = \"5.0.2\"\n light_tag = TagReference.create(rw_repo, tag_name)\n self.failUnlessRaises(GitCommandError, TagReference.create, rw_repo, tag_name)\n light_tag = TagReference.create(rw_repo, tag_name, \"HEAD~1\", force=True)"
}
] |
GitPython | 55db0fcce5ec5a92d2bdba8702bdfee9a8bca93d | d2f6fef3c887719a250c78c22cba723b2200df1b | git/cmd.py | https://github.com/costypetrisor/GitPython | true | false | true | @@ -323,7 +323,7 @@ class Git(LazyMixin):
return ''
if status != 0:
- errstr = read_all_from_possibly_closed_stream(self.proc.stderr.read)
+ errstr = read_all_from_possibly_closed_stream(self.proc.stderr)
raise GitCommandError(self.args, status, errstr)
# END status handling
return status
| errstr = read_all_from_possibly_closed_stream ( self . proc . stderr . read ) | errstr = read_all_from_possibly_closed_stream ( self . proc . stderr ) | SINGLE_STMT | [["Delete", [".:.", 3, 79, 3, 80]], ["Delete", ["identifier:read", 3, 80, 3, 84]]] | costypetrisor/GitPython@55db0fcce5ec5a92d2bdba8702bdfee9a8bca93d | fix(cmd): focus !
Thanks travis, once again ! | [
{
"sha": "33c15da6e87b9be6778f29e2255f5f5bb2f21b8d",
"filename": "git/cmd.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/costypetrisor/GitPython/blob/55db0fcce5ec5a92d2bdba8702bdfee9a8bca93d/git%2Fcmd.py",
"raw_url": "https://github.com/costypetrisor/GitPython/raw/55db0fcce5ec5a92d2bdba8702bdfee9a8bca93d/git%2Fcmd.py",
"contents_url": "https://api.github.com/repos/costypetrisor/GitPython/contents/git%2Fcmd.py?ref=55db0fcce5ec5a92d2bdba8702bdfee9a8bca93d",
"patch": "@@ -323,7 +323,7 @@ def read_all_from_possibly_closed_stream(stream):\n return ''\n \n if status != 0:\n- errstr = read_all_from_possibly_closed_stream(self.proc.stderr.read)\n+ errstr = read_all_from_possibly_closed_stream(self.proc.stderr)\n raise GitCommandError(self.args, status, errstr)\n # END status handling\n return status"
}
] |
GitPython | 6f6713669a8a32af90a73d03a7fa24e6154327f2 | af74966685e1d1f18390a783f6b8d26b3b1c26d1 | git/test/test_index.py | https://github.com/costypetrisor/GitPython | true | false | true | @@ -801,7 +801,7 @@ class TestIndex(TestBase):
def test_add_a_file_with_wildcard_chars(self, rw_dir):
# see issue #407
fp = os.path.join(rw_dir, '[.exe')
- with open(fp, "w") as f:
+ with open(fp, "wb") as f:
f.write(b'something')
r = Repo.init(rw_dir)
| with open ( fp , "w" ) as f : f . write ( b'something' ) | with open ( fp , "wb" ) as f : f . write ( b'something' ) | CHANGE_STRING_LITERAL | [["Update", ["string:\"w\"", 3, 23, 3, 26], "\"wb\""]] | costypetrisor/GitPython@6f6713669a8a32af90a73d03a7fa24e6154327f2 | fixed unittest of issue #407 for Python3 | [
{
"sha": "f5f9d7073fcce677c5fb6b6978e0fb7b44f6926a",
"filename": "git/test/test_index.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/costypetrisor/GitPython/blob/6f6713669a8a32af90a73d03a7fa24e6154327f2/git%2Ftest%2Ftest_index.py",
"raw_url": "https://github.com/costypetrisor/GitPython/raw/6f6713669a8a32af90a73d03a7fa24e6154327f2/git%2Ftest%2Ftest_index.py",
"contents_url": "https://api.github.com/repos/costypetrisor/GitPython/contents/git%2Ftest%2Ftest_index.py?ref=6f6713669a8a32af90a73d03a7fa24e6154327f2",
"patch": "@@ -801,7 +801,7 @@ def test_add_utf8P_path(self, rw_dir):\n def test_add_a_file_with_wildcard_chars(self, rw_dir):\n # see issue #407\n fp = os.path.join(rw_dir, '[.exe')\n- with open(fp, \"w\") as f:\n+ with open(fp, \"wb\") as f:\n f.write(b'something')\n \n r = Repo.init(rw_dir)"
}
] |
GitPython | 819c4ed8b443baee06472680f8d36022cb9c3240 | c883d129066f0aa11d806f123ef0ef1321262367 | git/test/test_docs.py | https://github.com/costypetrisor/GitPython | true | false | true | @@ -94,7 +94,7 @@ class Tutorials(TestBase):
# [11-test_init_repo_object]
assert now.commit.message != past.commit.message
# You can read objects directly through binary streams, no working tree required
- assert (now.commit.tree / 'VERSION').data_stream.read().decode('ascii').startswith('1')
+ assert (now.commit.tree / 'VERSION').data_stream.read().decode('ascii').startswith('2')
# You can traverse trees as well to handle all contained files of a particular commit
file_count = 0
| assert ( now . commit . tree / 'VERSION' ) . data_stream . read ( ) . decode ( 'ascii' ) . startswith ( '1' ) | assert ( now . commit . tree / 'VERSION' ) . data_stream . read ( ) . decode ( 'ascii' ) . startswith ( '2' ) | CHANGE_STRING_LITERAL | [["Update", ["string:'1'", 3, 92, 3, 95], "'2'"]] | costypetrisor/GitPython@819c4ed8b443baee06472680f8d36022cb9c3240 | Fix assertion
Who would have thought we ever go 2.0 ;). | [
{
"sha": "189cdc4304f1e3e86d4b439ff6c83437899ce65c",
"filename": "git/test/test_docs.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/costypetrisor/GitPython/blob/819c4ed8b443baee06472680f8d36022cb9c3240/git%2Ftest%2Ftest_docs.py",
"raw_url": "https://github.com/costypetrisor/GitPython/raw/819c4ed8b443baee06472680f8d36022cb9c3240/git%2Ftest%2Ftest_docs.py",
"contents_url": "https://api.github.com/repos/costypetrisor/GitPython/contents/git%2Ftest%2Ftest_docs.py?ref=819c4ed8b443baee06472680f8d36022cb9c3240",
"patch": "@@ -94,7 +94,7 @@ def test_init_repo_object(self, rw_dir):\n # [11-test_init_repo_object]\n assert now.commit.message != past.commit.message\n # You can read objects directly through binary streams, no working tree required\n- assert (now.commit.tree / 'VERSION').data_stream.read().decode('ascii').startswith('1')\n+ assert (now.commit.tree / 'VERSION').data_stream.read().decode('ascii').startswith('2')\n \n # You can traverse trees as well to handle all contained files of a particular commit\n file_count = 0"
}
] |
GitPython | 04ff96ddd0215881f72cc532adc6ff044e77ea3e | b9a7dc5fe98e1aa666445bc240055b21ed809824 | git/remote.py | https://github.com/costypetrisor/GitPython | true | false | true | @@ -550,7 +550,7 @@ class Remote(LazyMixin, Iterable):
progress_handler = progress.new_message_handler()
- for line in proc.stderr.readlines():
+ for line in proc.stderr:
line = line.decode(defenc)
for pline in progress_handler(line):
if line.startswith('fatal:') or line.startswith('error:'):
| for line in proc . stderr . readlines ( ) : line = line . decode ( defenc ) for pline in progress_handler ( line ) : if line . startswith ( 'fatal:' ) or line . startswith ( 'error:' ) : | for line in proc . stderr : line = line . decode ( defenc ) for pline in progress_handler ( line ) : if line . startswith ( 'fatal:' ) or line . startswith ( 'error:' ) : | SINGLE_STMT | [["Move", ["for_statement", 3, 9, 6, 75], ["attribute", 3, 21, 3, 32], 3], ["Delete", [".:.", 3, 32, 3, 33]], ["Delete", ["identifier:readlines", 3, 33, 3, 42]], ["Delete", ["attribute", 3, 21, 3, 42]], ["Delete", ["(:(", 3, 42, 3, 43]], ["Delete", ["):)", 3, 43, 3, 44]], ["Delete", ["argument_list", 3, 42, 3, 44]], ["Delete", ["call", 3, 21, 3, 44]]] | costypetrisor/GitPython@04ff96ddd0215881f72cc532adc6ff044e77ea3e | fix(remote): real-time reading of lines from stderr
That way, progress usage will behave as expected.
Fixes #444 | [
{
"sha": "bff26459f6acfcc94f1bc761e9a491ecffdfabdb",
"filename": "git/remote.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/costypetrisor/GitPython/blob/04ff96ddd0215881f72cc532adc6ff044e77ea3e/git%2Fremote.py",
"raw_url": "https://github.com/costypetrisor/GitPython/raw/04ff96ddd0215881f72cc532adc6ff044e77ea3e/git%2Fremote.py",
"contents_url": "https://api.github.com/repos/costypetrisor/GitPython/contents/git%2Fremote.py?ref=04ff96ddd0215881f72cc532adc6ff044e77ea3e",
"patch": "@@ -550,7 +550,7 @@ def _get_fetch_info_from_stderr(self, proc, progress):\n \n progress_handler = progress.new_message_handler()\n \n- for line in proc.stderr.readlines():\n+ for line in proc.stderr:\n line = line.decode(defenc)\n for pline in progress_handler(line):\n if line.startswith('fatal:') or line.startswith('error:'):"
}
] |
GitPython | 33940022821ec5e1c1766eb60ffd80013cb12771 | 902679c47c3d1238833ac9c9fdbc7c0ddbedf509 | git/remote.py | https://github.com/costypetrisor/GitPython | true | false | true | @@ -578,7 +578,7 @@ class Remote(LazyMixin, Iterable):
msg += "length of progress lines %i should be equal to lines in FETCH_HEAD file %i\n"
msg += "Will ignore extra progress lines or fetch head lines."
msg %= (l_fil, l_fhi)
- log.warn(msg)
+ log.debug(msg)
if l_fil < l_fhi:
fetch_head_info = fetch_head_info[:l_fil]
else:
| log . warn ( msg ) | log . debug ( msg ) | WRONG_FUNCTION_NAME | [["Update", ["identifier:warn", 3, 17, 3, 21], "debug"]] | costypetrisor/GitPython@33940022821ec5e1c1766eb60ffd80013cb12771 | Changing warning to debug logging, to avoid warning showing off when nothing's wrong
cf #444
Signed-off-by: Guyzmo <[email protected]> | [
{
"sha": "88658c387e1d30fcd752151892464bbfda925a11",
"filename": "git/remote.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/costypetrisor/GitPython/blob/33940022821ec5e1c1766eb60ffd80013cb12771/git%2Fremote.py",
"raw_url": "https://github.com/costypetrisor/GitPython/raw/33940022821ec5e1c1766eb60ffd80013cb12771/git%2Fremote.py",
"contents_url": "https://api.github.com/repos/costypetrisor/GitPython/contents/git%2Fremote.py?ref=33940022821ec5e1c1766eb60ffd80013cb12771",
"patch": "@@ -578,7 +578,7 @@ def _get_fetch_info_from_stderr(self, proc, progress):\n msg += \"length of progress lines %i should be equal to lines in FETCH_HEAD file %i\\n\"\n msg += \"Will ignore extra progress lines or fetch head lines.\"\n msg %= (l_fil, l_fhi)\n- log.warn(msg)\n+ log.debug(msg)\n if l_fil < l_fhi:\n fetch_head_info = fetch_head_info[:l_fil]\n else:"
}
] |
ngraph | 93930da7996131ae6c38bd3f419fa921c952a756 | 8865c24abfe292dd3b17c1e145480c31b9875282 | examples/resnet/train_resnet.py | https://github.com/rsumner31/ngraph | true | false | false | @@ -45,7 +45,7 @@ def loop_eval(dataset, computation, metric_names):
if __name__ == "__main__":
# Hyperparameters
# Optimizer
- base_lr = 0.01
+ base_lr = 0.1
gamma = 0.1
momentum_coef = 0.9
wdecay = 0.0001
| base_lr = 0.01 | base_lr = 0.1 | CHANGE_NUMERIC_LITERAL | [["Update", ["float:0.01", 3, 15, 3, 19], "0.1"]] | rsumner31/ngraph@93930da7996131ae6c38bd3f419fa921c952a756 | Fixed wrong learning rate | [
{
"sha": "c85366406f781521682fe31011e8cd12720cbbd7",
"filename": "examples/resnet/train_resnet.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/rsumner31/ngraph/blob/93930da7996131ae6c38bd3f419fa921c952a756/examples%2Fresnet%2Ftrain_resnet.py",
"raw_url": "https://github.com/rsumner31/ngraph/raw/93930da7996131ae6c38bd3f419fa921c952a756/examples%2Fresnet%2Ftrain_resnet.py",
"contents_url": "https://api.github.com/repos/rsumner31/ngraph/contents/examples%2Fresnet%2Ftrain_resnet.py?ref=93930da7996131ae6c38bd3f419fa921c952a756",
"patch": "@@ -45,7 +45,7 @@ def loop_eval(dataset, computation, metric_names):\n if __name__ == \"__main__\":\n # Hyperparameters\n # Optimizer\n- base_lr = 0.01\n+ base_lr = 0.1\n gamma = 0.1\n momentum_coef = 0.9\n wdecay = 0.0001"
}
] |
ngraph | d6da5ab9221cb91fd1c1bc67e2d19658f41573f1 | a239e7b98f22c7de9c30c37d82969cc2015058a6 | ngraph/frontends/cntk/tests/test_ops_unary.py | https://github.com/rsumner31/ngraph | true | false | false | @@ -13,7 +13,7 @@
# limitations under the License.
# ----------------------------------------------------------------------------
-from __future__ import print_function
+from __future__ import print_function, division
import cntk as C
import numpy as np
| from __future__ import print_function | from __future__ import print_function , division | SINGLE_STMT | [["Insert", ["future_import_statement", 3, 1, 3, 38], [",:,", "T"], 4], ["Insert", ["future_import_statement", 3, 1, 3, 38], ["dotted_name", "N0"], 5], ["Insert", "N0", ["identifier:division", "T"], 0]] | rsumner31/ngraph@d6da5ab9221cb91fd1c1bc67e2d19658f41573f1 | CNTK frontend - Unary ops
Bugfix for Python 2 testing | [
{
"sha": "b106a5bbe2461526d194a127205deda5a0881f56",
"filename": "ngraph/frontends/cntk/tests/test_ops_unary.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/rsumner31/ngraph/blob/d6da5ab9221cb91fd1c1bc67e2d19658f41573f1/ngraph%2Ffrontends%2Fcntk%2Ftests%2Ftest_ops_unary.py",
"raw_url": "https://github.com/rsumner31/ngraph/raw/d6da5ab9221cb91fd1c1bc67e2d19658f41573f1/ngraph%2Ffrontends%2Fcntk%2Ftests%2Ftest_ops_unary.py",
"contents_url": "https://api.github.com/repos/rsumner31/ngraph/contents/ngraph%2Ffrontends%2Fcntk%2Ftests%2Ftest_ops_unary.py?ref=d6da5ab9221cb91fd1c1bc67e2d19658f41573f1",
"patch": "@@ -13,7 +13,7 @@\n # limitations under the License.\n # ----------------------------------------------------------------------------\n \n-from __future__ import print_function\n+from __future__ import print_function, division\n \n import cntk as C\n import numpy as np"
}
] |
ngraph | 10a6a72538c64510bedb985e112e5b9e092a9c0f | 422c049fb05e936938605ee6f4261e8eff281667 | ngraph/frontends/neon/tests/test_layer_subgraph.py | https://github.com/rsumner31/ngraph | true | false | true | @@ -28,7 +28,7 @@ class NestedLayer(Layer):
def __init__(self, inner_layer=None, **kwargs):
super(NestedLayer, self).__init__(**kwargs)
if inner_layer is None:
- inner_layer = SimpleLayer(inherit_scope=self.scope)
+ inner_layer = SimpleLayer()
self.inner_layer = inner_layer
@SubGraph.scope_op_creation
| inner_layer = SimpleLayer ( inherit_scope = self . scope ) | inner_layer = SimpleLayer ( ) | SAME_FUNCTION_LESS_ARGS | [["Delete", ["identifier:inherit_scope", 3, 39, 3, 52]], ["Delete", ["=:=", 3, 52, 3, 53]], ["Delete", ["identifier:self", 3, 53, 3, 57]], ["Delete", [".:.", 3, 57, 3, 58]], ["Delete", ["identifier:scope", 3, 58, 3, 63]], ["Delete", ["attribute", 3, 53, 3, 63]], ["Delete", ["keyword_argument", 3, 39, 3, 63]]] | rsumner31/ngraph@10a6a72538c64510bedb985e112e5b9e092a9c0f | remove incorrect kwarg | [
{
"sha": "a3980aa72ed37258b0c4aeb7a7af4b4d205bdc91",
"filename": "ngraph/frontends/neon/tests/test_layer_subgraph.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/rsumner31/ngraph/blob/10a6a72538c64510bedb985e112e5b9e092a9c0f/ngraph%2Ffrontends%2Fneon%2Ftests%2Ftest_layer_subgraph.py",
"raw_url": "https://github.com/rsumner31/ngraph/raw/10a6a72538c64510bedb985e112e5b9e092a9c0f/ngraph%2Ffrontends%2Fneon%2Ftests%2Ftest_layer_subgraph.py",
"contents_url": "https://api.github.com/repos/rsumner31/ngraph/contents/ngraph%2Ffrontends%2Fneon%2Ftests%2Ftest_layer_subgraph.py?ref=10a6a72538c64510bedb985e112e5b9e092a9c0f",
"patch": "@@ -28,7 +28,7 @@ class NestedLayer(Layer):\n def __init__(self, inner_layer=None, **kwargs):\n super(NestedLayer, self).__init__(**kwargs)\n if inner_layer is None:\n- inner_layer = SimpleLayer(inherit_scope=self.scope)\n+ inner_layer = SimpleLayer()\n self.inner_layer = inner_layer\n \n @SubGraph.scope_op_creation"
}
] |
ngraph | 31b2cebfb9c23f0c038e23e07c515aab958f2d4f | 5b8abad378fd59cb7f791fd52a52417d54cb8825 | ngraph/transformers/hetrtransform.py | https://github.com/rsumner31/ngraph | true | false | true | @@ -111,7 +111,7 @@ class HetrComputation(Computation):
t_name = self.transformer.default_device + '0'
placeholders = [p for p in self.computation_op.parameters]
- my_ops = [op for op in self.send_nodes | new_returns if is_my_op(p, t_name)]
+ my_ops = [op for op in self.send_nodes | new_returns if is_my_op(op, t_name)]
transform_ops = [op.args[0] if isinstance(op, ResultOp) else op for op in my_ops]
total_ops = Op.all_op_references(transform_ops + placeholders)
| my_ops = [ op for op in self . send_nodes | new_returns if is_my_op ( p , t_name ) ] | my_ops = [ op for op in self . send_nodes | new_returns if is_my_op ( op , t_name ) ] | CHANGE_IDENTIFIER_USED | [["Update", ["identifier:p", 3, 74, 3, 75], "op"]] | rsumner31/ngraph@31b2cebfb9c23f0c038e23e07c515aab958f2d4f | minor fix | [
{
"sha": "d5fd8d356a111ab47d6ad4ac571cc747811c7af0",
"filename": "ngraph/transformers/hetrtransform.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/rsumner31/ngraph/blob/31b2cebfb9c23f0c038e23e07c515aab958f2d4f/ngraph%2Ftransformers%2Fhetrtransform.py",
"raw_url": "https://github.com/rsumner31/ngraph/raw/31b2cebfb9c23f0c038e23e07c515aab958f2d4f/ngraph%2Ftransformers%2Fhetrtransform.py",
"contents_url": "https://api.github.com/repos/rsumner31/ngraph/contents/ngraph%2Ftransformers%2Fhetrtransform.py?ref=31b2cebfb9c23f0c038e23e07c515aab958f2d4f",
"patch": "@@ -111,7 +111,7 @@ def is_my_op(op, name):\n \n t_name = self.transformer.default_device + '0'\n placeholders = [p for p in self.computation_op.parameters]\n- my_ops = [op for op in self.send_nodes | new_returns if is_my_op(p, t_name)]\n+ my_ops = [op for op in self.send_nodes | new_returns if is_my_op(op, t_name)]\n transform_ops = [op.args[0] if isinstance(op, ResultOp) else op for op in my_ops]\n total_ops = Op.all_op_references(transform_ops + placeholders)\n "
}
] |
ngraph | 41572bf230321c069baa685681a5d04f9d954cc9 | 9b4396e9a20fab32b08700f0742ce4ce8208f29e | ngraph/transformers/hetrtransform.py | https://github.com/rsumner31/ngraph | true | false | true | @@ -111,7 +111,7 @@ class HetrComputation(Computation):
t_name = self.transformer.default_device + '0'
placeholders = [p for p in self.computation_op.parameters]
- my_ops = [op for op in self.send_nodes | new_returns if is_my_op(p, t_name)]
+ my_ops = [op for op in self.send_nodes | new_returns if is_my_op(op, t_name)]
transform_ops = [op.args[0] if isinstance(op, ResultOp) else op for op in my_ops]
total_ops = Op.all_op_references(transform_ops + placeholders)
| my_ops = [ op for op in self . send_nodes | new_returns if is_my_op ( p , t_name ) ] | my_ops = [ op for op in self . send_nodes | new_returns if is_my_op ( op , t_name ) ] | CHANGE_IDENTIFIER_USED | [["Update", ["identifier:p", 3, 74, 3, 75], "op"]] | rsumner31/ngraph@41572bf230321c069baa685681a5d04f9d954cc9 | minor fix | [
{
"sha": "d5fd8d356a111ab47d6ad4ac571cc747811c7af0",
"filename": "ngraph/transformers/hetrtransform.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/rsumner31/ngraph/blob/41572bf230321c069baa685681a5d04f9d954cc9/ngraph%2Ftransformers%2Fhetrtransform.py",
"raw_url": "https://github.com/rsumner31/ngraph/raw/41572bf230321c069baa685681a5d04f9d954cc9/ngraph%2Ftransformers%2Fhetrtransform.py",
"contents_url": "https://api.github.com/repos/rsumner31/ngraph/contents/ngraph%2Ftransformers%2Fhetrtransform.py?ref=41572bf230321c069baa685681a5d04f9d954cc9",
"patch": "@@ -111,7 +111,7 @@ def is_my_op(op, name):\n \n t_name = self.transformer.default_device + '0'\n placeholders = [p for p in self.computation_op.parameters]\n- my_ops = [op for op in self.send_nodes | new_returns if is_my_op(p, t_name)]\n+ my_ops = [op for op in self.send_nodes | new_returns if is_my_op(op, t_name)]\n transform_ops = [op.args[0] if isinstance(op, ResultOp) else op for op in my_ops]\n total_ops = Op.all_op_references(transform_ops + placeholders)\n "
}
] |
ngraph | 88298f0816ff15082050d4c704a88b3af3eff719 | 6e1067324f33325980c365f1c451beaff2323868 | examples/resnet/train_resnet.py | https://github.com/rsumner31/ngraph | true | false | false | @@ -210,7 +210,7 @@ with closing(ngt.make_transformer_factory(args.backend, **t_args)()) as transfor
# Dictionary for training
feed_dict = {input_ph[k]: data[k] for k in input_ph.keys()}
# Learning Schedule
- feed_dict[lr_ph] = set_lr(base_lr, step, [10, 15], gamma)
+ feed_dict[lr_ph] = set_lr(base_lr, step, learning_schedule, gamma)
# Mean batch cost
output = train_function(feed_dict=feed_dict)
# Update progress bar
| feed_dict [ lr_ph ] = set_lr ( base_lr , step , [ 10 , 15 ] , gamma ) | feed_dict [ lr_ph ] = set_lr ( base_lr , step , learning_schedule , gamma ) | SINGLE_STMT | [["Insert", ["argument_list", 3, 34, 3, 66], ["identifier:learning_schedule", "T"], 5], ["Delete", ["[:[", 3, 50, 3, 51]], ["Delete", ["integer:10", 3, 51, 3, 53]], ["Delete", [",:,", 3, 53, 3, 54]], ["Delete", ["integer:15", 3, 55, 3, 57]], ["Delete", ["]:]", 3, 57, 3, 58]], ["Delete", ["list", 3, 50, 3, 58]]] | rsumner31/ngraph@88298f0816ff15082050d4c704a88b3af3eff719 | Fixed wrong learning rate schedule (#2360) | [
{
"sha": "88fe7a9851016a0748c24542a8e41b5b4940d477",
"filename": "examples/resnet/train_resnet.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/rsumner31/ngraph/blob/88298f0816ff15082050d4c704a88b3af3eff719/examples%2Fresnet%2Ftrain_resnet.py",
"raw_url": "https://github.com/rsumner31/ngraph/raw/88298f0816ff15082050d4c704a88b3af3eff719/examples%2Fresnet%2Ftrain_resnet.py",
"contents_url": "https://api.github.com/repos/rsumner31/ngraph/contents/examples%2Fresnet%2Ftrain_resnet.py?ref=88298f0816ff15082050d4c704a88b3af3eff719",
"patch": "@@ -210,7 +210,7 @@ def loop_eval(dataset, input_ph, metric_name, computation, en_top5=False):\n # Dictionary for training\n feed_dict = {input_ph[k]: data[k] for k in input_ph.keys()}\n # Learning Schedule\n- feed_dict[lr_ph] = set_lr(base_lr, step, [10, 15], gamma)\n+ feed_dict[lr_ph] = set_lr(base_lr, step, learning_schedule, gamma)\n # Mean batch cost\n output = train_function(feed_dict=feed_dict)\n # Update progress bar"
}
] |
ngraph | d407ff17b96afb5cb2365bbdef779c4702f33953 | eb57f2ca703e05a649f50109ef384b0897934b19 | ngraph/transformers/cpu/hetr.py | https://github.com/rsumner31/ngraph | true | false | true | @@ -72,7 +72,7 @@ class HetrLocals(object):
if len(self.dataloader_trackers[group_type]) % data_type_count == 0:
self.dataloader_trackers[group_type].clear()
- self.dataloader_data[group_type] = self.dataloaders[group_type].next()
+ self.dataloader_data[group_type] = next(self.dataloaders[group_type])
self.dataloader_trackers[group_type].add(data_type_index)
return_value = None
| self . dataloader_data [ group_type ] = self . dataloaders [ group_type ] . next ( ) | self . dataloader_data [ group_type ] = next ( self . dataloaders [ group_type ] ) | SINGLE_STMT | [["Insert", ["call", 3, 48, 3, 83], ["identifier:next", "T"], 0], ["Insert", ["call", 3, 48, 3, 83], ["argument_list", "N0"], 1], ["Insert", "N0", ["(:(", "T"], 0], ["Move", "N0", ["subscript", 3, 48, 3, 76], 1], ["Insert", "N0", ["):)", "T"], 2], ["Delete", [".:.", 3, 76, 3, 77]], ["Delete", ["identifier:next", 3, 77, 3, 81]], ["Delete", ["attribute", 3, 48, 3, 81]], ["Delete", ["(:(", 3, 81, 3, 82]], ["Delete", ["):)", 3, 82, 3, 83]], ["Delete", ["argument_list", 3, 81, 3, 83]]] | rsumner31/ngraph@d407ff17b96afb5cb2365bbdef779c4702f33953 | fix dataloader iterator for py3 | [
{
"sha": "584169cfea84a07e97d1106697802786ef1ba79c",
"filename": "ngraph/transformers/cpu/hetr.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/rsumner31/ngraph/blob/d407ff17b96afb5cb2365bbdef779c4702f33953/ngraph%2Ftransformers%2Fcpu%2Fhetr.py",
"raw_url": "https://github.com/rsumner31/ngraph/raw/d407ff17b96afb5cb2365bbdef779c4702f33953/ngraph%2Ftransformers%2Fcpu%2Fhetr.py",
"contents_url": "https://api.github.com/repos/rsumner31/ngraph/contents/ngraph%2Ftransformers%2Fcpu%2Fhetr.py?ref=d407ff17b96afb5cb2365bbdef779c4702f33953",
"patch": "@@ -72,7 +72,7 @@ def get_dataloader_data(self, cfg, group_type, data_type_index, data_type_count)\n \n if len(self.dataloader_trackers[group_type]) % data_type_count == 0:\n self.dataloader_trackers[group_type].clear()\n- self.dataloader_data[group_type] = self.dataloaders[group_type].next()\n+ self.dataloader_data[group_type] = next(self.dataloaders[group_type])\n \n self.dataloader_trackers[group_type].add(data_type_index)\n return_value = None"
}
] |
battlecode-multi-agents | 0b497b999c7702a480dd9683b8f69e417a5c31c1 | 8f5518d5c9fc137ee6eb3e07649944deabc1e32e | _smart-python/run.py | https://github.com/darthdeus/battlecode-multi-agents | true | false | true | @@ -68,7 +68,7 @@ def factory_logic(unit):
if unload_dir is not None:
gc.unload(unit.id, unload_dir)
- type = factory_priority[random.randint(0, 1, 2)]
+ type = factory_priority[random.randint(0, 2)]
global rocket_count
rocket_level = gc.research_info().get_level(bc.UnitType.Rocket)
| type = factory_priority [ random . randint ( 0 , 1 , 2 ) ] | type = factory_priority [ random . randint ( 0 , 2 ) ] | SAME_FUNCTION_LESS_ARGS | [["Delete", ["integer:1", 3, 47, 3, 48]], ["Delete", [",:,", 3, 48, 3, 49]]] | darthdeus/battlecode-multi-agents@0b497b999c7702a480dd9683b8f69e417a5c31c1 | minor fix randint | [
{
"sha": "59d2bc8e18f7aec2a56221adcbf86d06eb78b0d0",
"filename": "_smart-python/run.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/darthdeus/battlecode-multi-agents/blob/0b497b999c7702a480dd9683b8f69e417a5c31c1/_smart-python%2Frun.py",
"raw_url": "https://github.com/darthdeus/battlecode-multi-agents/raw/0b497b999c7702a480dd9683b8f69e417a5c31c1/_smart-python%2Frun.py",
"contents_url": "https://api.github.com/repos/darthdeus/battlecode-multi-agents/contents/_smart-python%2Frun.py?ref=0b497b999c7702a480dd9683b8f69e417a5c31c1",
"patch": "@@ -68,7 +68,7 @@ def factory_logic(unit):\n if unload_dir is not None:\r\n gc.unload(unit.id, unload_dir)\r\n \r\n- type = factory_priority[random.randint(0, 1, 2)]\r\n+ type = factory_priority[random.randint(0, 2)]\r\n \r\n global rocket_count\r\n rocket_level = gc.research_info().get_level(bc.UnitType.Rocket)\r"
}
] |
twitter-btc | 9e5bf5093f647172c793a065fb45697525c51a09 | 61bcc0347976b696edc73273a2418ee6569925e8 | correlate.py | https://github.com/whitstd/twitter-btc | true | false | false | @@ -23,7 +23,7 @@ daily = daily.merge(btc, how = 'inner', on = 'date')
lags = 2
for i in range(1, lags + 1):
- daily['close-{}'.format(i)] = daily['close'].shift(i).values
+ daily['polarity-{}'.format(i)] = daily['polarity'].shift(i).values
print('Computing correlation matrix ...')
print(daily.corr())
| daily [ 'close-{}' . format ( i ) ] = daily [ 'close' ] . shift ( i ) . values | daily [ 'polarity-{}' . format ( i ) ] = daily [ 'polarity' ] . shift ( i ) . values | SINGLE_STMT | [["Update", ["string:'close-{}'", 3, 11, 3, 21], "'polarity-{}'"], ["Update", ["string:'close'", 3, 41, 3, 48], "'polarity'"]] | whitstd/twitter-btc@9e5bf5093f647172c793a065fb45697525c51a09 | null | null |
adyen_notification_server | f7037af55d8f7081a0db434f7633fa6ded9fbe3c | 05e7cfbc6c5a263ab5cf30705beeb1e661d87ecc | notifications.py | https://github.com/crrood/adyen_notification_server | true | false | true | @@ -61,7 +61,7 @@ def get_latest_n_from_db(merchant_account, number_of_notifications):
result = []
for id, raw_data in session.query(Notification.id, Notification.rawData).\
filter_by(merchantAccountCode=merchant_account).\
- order_by(desc(Notification.id))[1:number_of_notifications]:
+ order_by(desc(Notification.id))[1:number_of_notifications + 1]:
result.append(raw_data)
return result
| for id , raw_data in session . query ( Notification . id , Notification . rawData ) . filter_by ( merchantAccountCode = merchant_account ) . order_by ( desc ( Notification . id ) ) [ 1 : number_of_notifications ] : result . append ( raw_data ) | for id , raw_data in session . query ( Notification . id , Notification . rawData ) . filter_by ( merchantAccountCode = merchant_account ) . order_by ( desc ( Notification . id ) ) [ 1 : number_of_notifications + 1 ] : result . append ( raw_data ) | SINGLE_STMT | [["Insert", ["slice", 3, 45, 3, 70], ["binary_operator", "N0"], 2], ["Move", "N0", ["identifier:number_of_notifications", 3, 47, 3, 70], 0], ["Insert", "N0", ["+:+", "T"], 1], ["Insert", "N0", ["integer:1", "T"], 2]] | crrood/adyen_notification_server@f7037af55d8f7081a0db434f7633fa6ded9fbe3c | off by one error in latest n notifications endpoint | [
{
"sha": "6775b6b9e12d4bfd5fcf27c22f11e5b0a3bab71f",
"filename": "notifications.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/crrood/adyen_notification_server/blob/f7037af55d8f7081a0db434f7633fa6ded9fbe3c/notifications.py",
"raw_url": "https://github.com/crrood/adyen_notification_server/raw/f7037af55d8f7081a0db434f7633fa6ded9fbe3c/notifications.py",
"contents_url": "https://api.github.com/repos/crrood/adyen_notification_server/contents/notifications.py?ref=f7037af55d8f7081a0db434f7633fa6ded9fbe3c",
"patch": "@@ -61,7 +61,7 @@ def get_latest_n_from_db(merchant_account, number_of_notifications):\n result = []\n for id, raw_data in session.query(Notification.id, Notification.rawData).\\\n filter_by(merchantAccountCode=merchant_account).\\\n- order_by(desc(Notification.id))[1:number_of_notifications]:\n+ order_by(desc(Notification.id))[1:number_of_notifications + 1]:\n result.append(raw_data)\n \n return result"
}
] |
adyen_notification_server | 7e0879abb67cb726d311dde1bc2a64e0c7d54a9d | 62e45a82b14a0c65984366a61f9436a73c74fde4 | notifications.py | https://github.com/crrood/adyen_notification_server | true | false | false | @@ -27,7 +27,7 @@ env = Environment(
# otherwise defaults to production
try:
with open("env.txt") as env_file:
- if env_file.read() == "DEV":
+ if env_file.read().strip() == "DEV":
ENV = "_dev"
else:
ENV = ""
| if env_file . read ( ) == "DEV" : ENV = "_dev" else : ENV = "" | if env_file . read ( ) . strip ( ) == "DEV" : ENV = "_dev" else : ENV = "" | ADD_METHOD_CALL | [["Insert", ["attribute", 3, 12, 3, 25], ["call", "N0"], 0], ["Insert", ["attribute", 3, 12, 3, 25], [".:.", "T"], 1], ["Insert", ["attribute", 3, 12, 3, 25], ["identifier:strip", "T"], 2], ["Move", "N0", ["attribute", 3, 12, 3, 25], 0], ["Insert", "N0", ["argument_list", "N1"], 1], ["Insert", "N1", ["(:(", "T"], 0], ["Insert", "N1", ["):)", "T"], 1]] | crrood/adyen_notification_server@7e0879abb67cb726d311dde1bc2a64e0c7d54a9d | fix error in reading env file | [
{
"sha": "e34fd25d2ee0a43a74b0e8b6b819e46e70c563a1",
"filename": "notifications.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/crrood/adyen_notification_server/blob/7e0879abb67cb726d311dde1bc2a64e0c7d54a9d/notifications.py",
"raw_url": "https://github.com/crrood/adyen_notification_server/raw/7e0879abb67cb726d311dde1bc2a64e0c7d54a9d/notifications.py",
"contents_url": "https://api.github.com/repos/crrood/adyen_notification_server/contents/notifications.py?ref=7e0879abb67cb726d311dde1bc2a64e0c7d54a9d",
"patch": "@@ -27,7 +27,7 @@\n # otherwise defaults to production\n try:\n with open(\"env.txt\") as env_file:\n- if env_file.read() == \"DEV\":\n+ if env_file.read().strip() == \"DEV\":\n ENV = \"_dev\"\n else:\n ENV = \"\""
}
] |
adyen_notification_server | 2efc878abc403657327daf5a9130bb01b701837b | 5eff926ce52ee67df21ed3e97dbbca5c36779bea | notifications.py | https://github.com/crrood/adyen_notification_server | true | false | false | @@ -36,7 +36,7 @@ ENV = config["env"]
if ENV == "PROD":
SERVER_ROOT = "/notification_server/"
else:
- SERVER_ROOT = "notification_server_{}".format(config["env"])
+ SERVER_ROOT = "/notification_server_{}".format(config["env"])
# initialize flask app
app = Flask(__name__)
| SERVER_ROOT = "notification_server_{}" . format ( config [ "env" ] ) | SERVER_ROOT = "/notification_server_{}" . format ( config [ "env" ] ) | CHANGE_STRING_LITERAL | [["Update", ["string:\"notification_server_{}\"", 3, 19, 3, 43], "\"/notification_server_{}\""]] | crrood/adyen_notification_server@2efc878abc403657327daf5a9130bb01b701837b | fix missing slash in non-prod URL | [
{
"sha": "2a6953673ad80aeae59a20b850c2041c8d6e636c",
"filename": "notifications.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/crrood/adyen_notification_server/blob/2efc878abc403657327daf5a9130bb01b701837b/notifications.py",
"raw_url": "https://github.com/crrood/adyen_notification_server/raw/2efc878abc403657327daf5a9130bb01b701837b/notifications.py",
"contents_url": "https://api.github.com/repos/crrood/adyen_notification_server/contents/notifications.py?ref=2efc878abc403657327daf5a9130bb01b701837b",
"patch": "@@ -36,7 +36,7 @@\n if ENV == \"PROD\":\n SERVER_ROOT = \"/notification_server/\"\n else:\n- SERVER_ROOT = \"notification_server_{}\".format(config[\"env\"])\n+ SERVER_ROOT = \"/notification_server_{}\".format(config[\"env\"])\n \n # initialize flask app\n app = Flask(__name__)"
}
] |
adyen_notification_server | 7243d07c58b39f84f7b89de6cfc7e70113f0a85d | 22d778d4d5739b13c32788d16ec2909713dbf16f | notifications.py | https://github.com/crrood/adyen_notification_server | true | false | true | @@ -160,7 +160,7 @@ def get_range_from_db(merchant_account, first_notification, last_notification):
# put results into array
last_notification = min(results.count() - 1, last_notification)
for raw_data in results[first_notification : last_notification]:
- response.append(raw_data)
+ response.append(raw_data[0])
return response
| response . append ( raw_data ) | response . append ( raw_data [ 0 ] ) | SINGLE_STMT | [["Insert", ["argument_list", 3, 24, 3, 34], ["subscript", "N0"], 1], ["Move", "N0", ["identifier:raw_data", 3, 25, 3, 33], 0], ["Insert", "N0", ["[:[", "T"], 1], ["Insert", "N0", ["integer:0", "T"], 2], ["Insert", "N0", ["]:]", "T"], 3]] | crrood/adyen_notification_server@7243d07c58b39f84f7b89de6cfc7e70113f0a85d | fix bug in querying past notifications | [
{
"sha": "1eaa385942b669fad46f7f091435d16dfe540c12",
"filename": "notifications.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/crrood/adyen_notification_server/blob/7243d07c58b39f84f7b89de6cfc7e70113f0a85d/notifications.py",
"raw_url": "https://github.com/crrood/adyen_notification_server/raw/7243d07c58b39f84f7b89de6cfc7e70113f0a85d/notifications.py",
"contents_url": "https://api.github.com/repos/crrood/adyen_notification_server/contents/notifications.py?ref=7243d07c58b39f84f7b89de6cfc7e70113f0a85d",
"patch": "@@ -160,7 +160,7 @@ def get_range_from_db(merchant_account, first_notification, last_notification):\n # put results into array\n last_notification = min(results.count() - 1, last_notification)\n for raw_data in results[first_notification : last_notification]:\n- response.append(raw_data)\n+ response.append(raw_data[0])\n \n return response\n "
}
] |
ICNN-DeepRL | ee55e127d39d601692c8ad2ae034155a68550db4 | f426a01913c05c63310890731a610205887b221f | src/icnn.py | https://github.com/Srivatsan-Srinivasan/ICNN-DeepRL | true | false | true | @@ -314,7 +314,7 @@ class Agent:
with self.sess.as_default():
#obs, act, rew, ob2, term2, info = self.rm.minibatch(size=FLAGS.bsize)
- experience = self.rb.sample(batch_size, beta=beta_schedule.value(t))
+ experience = self.rb.sample(FLAGS.bsize, beta=self.beta_schedule.value(t))
(obs, act, rew, ob2, term2, weights, batch_idxes) = experience
| experience = self . rb . sample ( batch_size , beta = beta_schedule . value ( t ) ) | experience = self . rb . sample ( FLAGS . bsize , beta = self . beta_schedule . value ( t ) ) | SINGLE_STMT | [["Insert", ["argument_list", 3, 40, 3, 81], ["attribute", "N0"], 1], ["Update", ["identifier:batch_size", 3, 41, 3, 51], "FLAGS"], ["Move", "N0", ["identifier:batch_size", 3, 41, 3, 51], 0], ["Insert", "N0", [".:.", "T"], 1], ["Insert", "N0", ["identifier:bsize", "T"], 2], ["Insert", ["attribute", 3, 58, 3, 77], ["attribute", "N1"], 0], ["Insert", "N1", ["identifier:self", "T"], 0], ["Insert", "N1", [".:.", "T"], 1], ["Move", "N1", ["identifier:beta_schedule", 3, 58, 3, 71], 2]] | Srivatsan-Srinivasan/ICNN-DeepRL@ee55e127d39d601692c8ad2ae034155a68550db4 | fix minor bug in per | [
{
"sha": "92fa32b043109705937cf5e4e4a407fc16aee7f5",
"filename": "src/icnn.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/Srivatsan-Srinivasan/ICNN-DeepRL/blob/ee55e127d39d601692c8ad2ae034155a68550db4/src%2Ficnn.py",
"raw_url": "https://github.com/Srivatsan-Srinivasan/ICNN-DeepRL/raw/ee55e127d39d601692c8ad2ae034155a68550db4/src%2Ficnn.py",
"contents_url": "https://api.github.com/repos/Srivatsan-Srinivasan/ICNN-DeepRL/contents/src%2Ficnn.py?ref=ee55e127d39d601692c8ad2ae034155a68550db4",
"patch": "@@ -314,7 +314,7 @@ def train(self):\n with self.sess.as_default():\n #obs, act, rew, ob2, term2, info = self.rm.minibatch(size=FLAGS.bsize)\n \n- experience = self.rb.sample(batch_size, beta=beta_schedule.value(t))\n+ experience = self.rb.sample(FLAGS.bsize, beta=self.beta_schedule.value(t))\n (obs, act, rew, ob2, term2, weights, batch_idxes) = experience\n \n "
}
] |
ICNN-DeepRL | cac692a7f3dcc217927715971f9e5fb3575a460a | ee55e127d39d601692c8ad2ae034155a68550db4 | src/icnn.py | https://github.com/Srivatsan-Srinivasan/ICNN-DeepRL | true | false | true | @@ -314,7 +314,7 @@ class Agent:
with self.sess.as_default():
#obs, act, rew, ob2, term2, info = self.rm.minibatch(size=FLAGS.bsize)
- experience = self.rb.sample(FLAGS.bsize, beta=self.beta_schedule.value(t))
+ experience = self.rb.sample(FLAGS.bsize, beta=self.beta_schedule.value(self.t))
(obs, act, rew, ob2, term2, weights, batch_idxes) = experience
| experience = self . rb . sample ( FLAGS . bsize , beta = self . beta_schedule . value ( t ) ) | experience = self . rb . sample ( FLAGS . bsize , beta = self . beta_schedule . value ( self . t ) ) | SINGLE_STMT | [["Insert", ["argument_list", 3, 83, 3, 86], ["attribute", "N0"], 1], ["Insert", "N0", ["identifier:self", "T"], 0], ["Insert", "N0", [".:.", "T"], 1], ["Move", "N0", ["identifier:t", 3, 84, 3, 85], 2]] | Srivatsan-Srinivasan/ICNN-DeepRL@cac692a7f3dcc217927715971f9e5fb3575a460a | fix bug | [
{
"sha": "64a5abb3dc56d058bbdb75d6a298f25f8c23b996",
"filename": "src/icnn.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/Srivatsan-Srinivasan/ICNN-DeepRL/blob/cac692a7f3dcc217927715971f9e5fb3575a460a/src%2Ficnn.py",
"raw_url": "https://github.com/Srivatsan-Srinivasan/ICNN-DeepRL/raw/cac692a7f3dcc217927715971f9e5fb3575a460a/src%2Ficnn.py",
"contents_url": "https://api.github.com/repos/Srivatsan-Srinivasan/ICNN-DeepRL/contents/src%2Ficnn.py?ref=cac692a7f3dcc217927715971f9e5fb3575a460a",
"patch": "@@ -314,7 +314,7 @@ def train(self):\n with self.sess.as_default():\n #obs, act, rew, ob2, term2, info = self.rm.minibatch(size=FLAGS.bsize)\n \n- experience = self.rb.sample(FLAGS.bsize, beta=self.beta_schedule.value(t))\n+ experience = self.rb.sample(FLAGS.bsize, beta=self.beta_schedule.value(self.t))\n (obs, act, rew, ob2, term2, weights, batch_idxes) = experience\n \n "
}
] |
ICNN-DeepRL | d7009663714d82b12787f83e3c523fc46feb78f2 | b5ac7bfcb74176ebe63663dadc097a146065d123 | src/icnn.py | https://github.com/Srivatsan-Srinivasan/ICNN-DeepRL | true | false | true | @@ -463,7 +463,7 @@ class Fun:
feeds[self._inputs[argpos]] = arg
out = self._outputs + [self._summary_op] if log else self._outputs
- res = self._sesion.run(out, feeds)
+ res = self._session.run(out, feeds)
if log:
| res = self . _sesion . run ( out , feeds ) | res = self . _session . run ( out , feeds ) | CHANGE_ATTRIBUTE_USED | [["Update", ["identifier:_sesion", 3, 20, 3, 27], "_session"]] | Srivatsan-Srinivasan/ICNN-DeepRL@d7009663714d82b12787f83e3c523fc46feb78f2 | fix typo | [
{
"sha": "78ceb0868be0e913a92c6ec351d3fdfa0bd519fd",
"filename": "src/icnn.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/Srivatsan-Srinivasan/ICNN-DeepRL/blob/d7009663714d82b12787f83e3c523fc46feb78f2/src%2Ficnn.py",
"raw_url": "https://github.com/Srivatsan-Srinivasan/ICNN-DeepRL/raw/d7009663714d82b12787f83e3c523fc46feb78f2/src%2Ficnn.py",
"contents_url": "https://api.github.com/repos/Srivatsan-Srinivasan/ICNN-DeepRL/contents/src%2Ficnn.py?ref=d7009663714d82b12787f83e3c523fc46feb78f2",
"patch": "@@ -463,7 +463,7 @@ def __call__(self, *args, **kwargs):\n feeds[self._inputs[argpos]] = arg\n \n out = self._outputs + [self._summary_op] if log else self._outputs\n- res = self._sesion.run(out, feeds)\n+ res = self._session.run(out, feeds)\n \n \n if log:"
}
] |
ICNN-DeepRL | 6efc3e7ea1fb4568fc125d96731e3aabd336cc25 | f37358040c74102dea3f6f84c6ad683dded7537c | src/agent.py | https://github.com/Srivatsan-Srinivasan/ICNN-DeepRL | true | false | false | @@ -17,7 +17,7 @@ flags.DEFINE_float('pl2norm', 0.001, 'policy network l2 weight decay (only for D
flags.DEFINE_float('rate', 0.001, 'learning rate')
flags.DEFINE_float('prate', 0.0001, 'policy net learning rate (only for DDPG)')
flags.DEFINE_float('outheta', 0.15, 'noise theta') # large theta -> small noise
-flags.DEFINE_float('ousigma', 0.1, 'noise sigma') # minimum noise
+flags.DEFINE_float('ousigma', 0.2, 'noise sigma') # minimum noise
flags.DEFINE_float('lrelu', 0.01, 'leak relu rate')
| flags . DEFINE_float ( 'ousigma' , 0.1 , 'noise sigma' ) | flags . DEFINE_float ( 'ousigma' , 0.2 , 'noise sigma' ) | CHANGE_NUMERIC_LITERAL | [["Update", ["float:0.1", 3, 31, 3, 34], "0.2"]] | Srivatsan-Srinivasan/ICNN-DeepRL@6efc3e7ea1fb4568fc125d96731e3aabd336cc25 | change default noise | [
{
"sha": "1c09b81bf52c198f4e24e158f0548597dad46682",
"filename": "src/agent.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/Srivatsan-Srinivasan/ICNN-DeepRL/blob/6efc3e7ea1fb4568fc125d96731e3aabd336cc25/src%2Fagent.py",
"raw_url": "https://github.com/Srivatsan-Srinivasan/ICNN-DeepRL/raw/6efc3e7ea1fb4568fc125d96731e3aabd336cc25/src%2Fagent.py",
"contents_url": "https://api.github.com/repos/Srivatsan-Srinivasan/ICNN-DeepRL/contents/src%2Fagent.py?ref=6efc3e7ea1fb4568fc125d96731e3aabd336cc25",
"patch": "@@ -17,7 +17,7 @@\n flags.DEFINE_float('rate', 0.001, 'learning rate')\n flags.DEFINE_float('prate', 0.0001, 'policy net learning rate (only for DDPG)')\n flags.DEFINE_float('outheta', 0.15, 'noise theta') # large theta -> small noise\n-flags.DEFINE_float('ousigma', 0.1, 'noise sigma') # minimum noise\n+flags.DEFINE_float('ousigma', 0.2, 'noise sigma') # minimum noise\n flags.DEFINE_float('lrelu', 0.01, 'leak relu rate')\n \n "
}
] |
ICNN-DeepRL | 42b8539d5e75a98b06a030012efd3e57c4b1ec5b | f52ec01ad38e3da22cff0bbcdd469a3e90d34d46 | src/baselines/deepq/simple.py | https://github.com/Srivatsan-Srinivasan/ICNN-DeepRL | true | false | false | @@ -166,7 +166,7 @@ def learn(env,
- os.makdirs(model_path, exist_ok=True)
+ os.makedirs(model_path, exist_ok=True)
test_log = open(os.path.join(model_path, 'test_{}.log'.format(trial_i)), 'w')
train_log = open(os.path.join(model_path, 'train_{}.log'.format(trial_i)), 'w')
| os . makdirs ( model_path , exist_ok = True ) | os . makedirs ( model_path , exist_ok = True ) | WRONG_FUNCTION_NAME | [["Update", ["identifier:makdirs", 0, 8, 0, 15], "makedirs"]] | Srivatsan-Srinivasan/ICNN-DeepRL@42b8539d5e75a98b06a030012efd3e57c4b1ec5b | fix bug in deepq | [
{
"sha": "890bb276a213f1eb3d85b64b8c24111c772979f0",
"filename": "src/baselines/deepq/simple.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/Srivatsan-Srinivasan/ICNN-DeepRL/blob/42b8539d5e75a98b06a030012efd3e57c4b1ec5b/src%2Fbaselines%2Fdeepq%2Fsimple.py",
"raw_url": "https://github.com/Srivatsan-Srinivasan/ICNN-DeepRL/raw/42b8539d5e75a98b06a030012efd3e57c4b1ec5b/src%2Fbaselines%2Fdeepq%2Fsimple.py",
"contents_url": "https://api.github.com/repos/Srivatsan-Srinivasan/ICNN-DeepRL/contents/src%2Fbaselines%2Fdeepq%2Fsimple.py?ref=42b8539d5e75a98b06a030012efd3e57c4b1ec5b",
"patch": "@@ -166,7 +166,7 @@ def learn(env,\n Wrapper over act function. Adds ability to save it and load it.\n See header of baselines/deepq/categorical.py for details on the act function.\n \"\"\"\n- os.makdirs(model_path, exist_ok=True)\n+ os.makedirs(model_path, exist_ok=True)\n test_log = open(os.path.join(model_path, 'test_{}.log'.format(trial_i)), 'w')\n train_log = open(os.path.join(model_path, 'train_{}.log'.format(trial_i)), 'w')\n "
}
] |
CurriculumLearningFYP | 6e35b3e38e46816b7ab6db4e45df7d77ca66c493 | 606c6764c48e905965f24220b0315221aba5604e | run_experiments.py | https://github.com/MarkPKCollier/CurriculumLearningFYP | true | false | false | @@ -26,7 +26,7 @@ run_cmd = '''gcloud ml-engine jobs submit training {0}_mann_{1}_{10}_init_mode_c
--batch_size={15} \
--eval_batch_size={16} \
--num_train_steps={17} \
---steps_per_eval={19}
+--steps_per_eval={18}
| { 19 } | { 18 } | CHANGE_NUMERIC_LITERAL | [["Update", ["integer:19", 3, 19, 3, 21], "18"]] | MarkPKCollier/CurriculumLearningFYP@6e35b3e38e46816b7ab6db4e45df7d77ca66c493 | minor bug fix | [
{
"sha": "44bae90d8f230ca3a24f0f2c697a1c6f59ed0f07",
"filename": "run_experiments.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/MarkPKCollier/CurriculumLearningFYP/blob/6e35b3e38e46816b7ab6db4e45df7d77ca66c493/run_experiments.py",
"raw_url": "https://github.com/MarkPKCollier/CurriculumLearningFYP/raw/6e35b3e38e46816b7ab6db4e45df7d77ca66c493/run_experiments.py",
"contents_url": "https://api.github.com/repos/MarkPKCollier/CurriculumLearningFYP/contents/run_experiments.py?ref=6e35b3e38e46816b7ab6db4e45df7d77ca66c493",
"patch": "@@ -26,7 +26,7 @@\n --batch_size={15} \\\n --eval_batch_size={16} \\\n --num_train_steps={17} \\\n---steps_per_eval={19}\n+--steps_per_eval={18}\n '''\n \n VERSION = 0"
}
] |
pemcoupling | d857865911046f5e46a801e1fd434dbd9cdf07b1 | bc2033c72f4ff4f84c2f011565393d15d48c7da4 | PEMcoupling.py | https://github.com/pdqnguyen/pemcoupling | true | false | false | @@ -55,7 +55,7 @@ try:
from coupling.pemchannel import PEMChannelASD
from coupling.coupfunc import CoupFunc
from coupling.coherence import coherence
- from coupling.savedate import ratio_table
+ from coupling.savedata import ratio_table
from PEMcoupling_composite import get_composite_coup_func
except ImportError:
print('')
| from coupling . savedate import ratio_table | from coupling . savedata import ratio_table | CHANGE_IDENTIFIER_USED | [["Update", ["identifier:savedate", 3, 19, 3, 27], "savedata"]] | pdqnguyen/pemcoupling@d857865911046f5e46a801e1fd434dbd9cdf07b1 | fixed typo in importing savedata module | [
{
"sha": "db50091667b57d5b32e0d025c07d0393cc49567d",
"filename": "PEMcoupling.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/pdqnguyen/pemcoupling/blob/d857865911046f5e46a801e1fd434dbd9cdf07b1/PEMcoupling.py",
"raw_url": "https://github.com/pdqnguyen/pemcoupling/raw/d857865911046f5e46a801e1fd434dbd9cdf07b1/PEMcoupling.py",
"contents_url": "https://api.github.com/repos/pdqnguyen/pemcoupling/contents/PEMcoupling.py?ref=d857865911046f5e46a801e1fd434dbd9cdf07b1",
"patch": "@@ -55,7 +55,7 @@\n from coupling.pemchannel import PEMChannelASD\n from coupling.coupfunc import CoupFunc\n from coupling.coherence import coherence\n- from coupling.savedate import ratio_table\n+ from coupling.savedata import ratio_table\n from PEMcoupling_composite import get_composite_coup_func\n except ImportError:\n print('')"
}
] |
python-port-scanner-2 | bcc0cc763b8ed530c9a08685c666e8432c52f147 | 6f3939d8f88bcd38e3f9814dfba01308001a3854 | pslib.py | https://github.com/rsumner31/python-port-scanner-2 | true | false | true | @@ -42,7 +42,7 @@ def scn_me(parms, all_port_chk):
popupmessageErr("No Internet connection")
else:
open("out.txt", "w").close
- rst = run_scn_thread()
+ rst = RunScanThread()
t2 = threading.Thread(target=(rst.run_scan))
t2.start()
| rst = run_scn_thread ( ) | rst = RunScanThread ( ) | WRONG_FUNCTION_NAME | [["Update", ["identifier:run_scn_thread", 3, 19, 3, 33], "RunScanThread"]] | rsumner31/python-port-scanner-2@bcc0cc763b8ed530c9a08685c666e8432c52f147 | Fixed class name PEP8 standards | [
{
"sha": "ca4508c32dcf97940606688eacb2e74e89f7cb36",
"filename": "pslib.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/rsumner31/python-port-scanner-2/blob/bcc0cc763b8ed530c9a08685c666e8432c52f147/pslib.py",
"raw_url": "https://github.com/rsumner31/python-port-scanner-2/raw/bcc0cc763b8ed530c9a08685c666e8432c52f147/pslib.py",
"contents_url": "https://api.github.com/repos/rsumner31/python-port-scanner-2/contents/pslib.py?ref=bcc0cc763b8ed530c9a08685c666e8432c52f147",
"patch": "@@ -42,7 +42,7 @@ def scn_me(parms, all_port_chk):\n popupmessageErr(\"No Internet connection\")\n else:\n open(\"out.txt\", \"w\").close\n- rst = run_scn_thread()\n+ rst = RunScanThread()\n t2 = threading.Thread(target=(rst.run_scan))\n t2.start()\n "
}
] |
ngraph | 62a8b8d6ceae6a8c317461629a53a8b8d4c3d23c | 6d599c9c8b870a994831fc39afcb2c09c9d09c17 | ngraph/transformers/gpu/gpulayout.py | https://github.com/rsumner31/ngraph | true | false | false | @@ -24,7 +24,7 @@ from ngraph.op_graph.convolution import ConvolutionOp, update_conv, bprop_conv
from ngraph.op_graph.pooling import PoolingOp, BpropPoolOp
from ngraph.op_graph.axes import Axes
from ngraph.op_graph.lookuptable import LookupTableOp, update_lut, bprop_lut
-from ngraph.factory.comm_nodes import GpuQueueSendOp, GpuQueueRecvOp
+from ngraph.op_graph.comm_nodes import GPUQueueSendOp, GPUQueueRecvOp
from ngraph.transformers.passes.layout import LayoutAssignment, BinaryLayoutConstraint, \
UnaryLayoutConstraint
| from ngraph . factory . comm_nodes import GpuQueueSendOp , GpuQueueRecvOp | from ngraph . op_graph . comm_nodes import GPUQueueSendOp , GPUQueueRecvOp | SINGLE_STMT | [["Update", ["identifier:factory", 3, 13, 3, 20], "op_graph"], ["Update", ["identifier:GpuQueueSendOp", 3, 39, 3, 53], "GPUQueueSendOp"], ["Update", ["identifier:GpuQueueRecvOp", 3, 55, 3, 69], "GPUQueueRecvOp"]] | rsumner31/ngraph@62a8b8d6ceae6a8c317461629a53a8b8d4c3d23c | Path fix | [
{
"sha": "37e5236abb0cacdd881432d31015a27b3eeed0e3",
"filename": "ngraph/transformers/gpu/gpulayout.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/rsumner31/ngraph/blob/62a8b8d6ceae6a8c317461629a53a8b8d4c3d23c/ngraph%2Ftransformers%2Fgpu%2Fgpulayout.py",
"raw_url": "https://github.com/rsumner31/ngraph/raw/62a8b8d6ceae6a8c317461629a53a8b8d4c3d23c/ngraph%2Ftransformers%2Fgpu%2Fgpulayout.py",
"contents_url": "https://api.github.com/repos/rsumner31/ngraph/contents/ngraph%2Ftransformers%2Fgpu%2Fgpulayout.py?ref=62a8b8d6ceae6a8c317461629a53a8b8d4c3d23c",
"patch": "@@ -24,7 +24,7 @@\n from ngraph.op_graph.pooling import PoolingOp, BpropPoolOp\n from ngraph.op_graph.axes import Axes\n from ngraph.op_graph.lookuptable import LookupTableOp, update_lut, bprop_lut\n-from ngraph.factory.comm_nodes import GpuQueueSendOp, GpuQueueRecvOp\n+from ngraph.op_graph.comm_nodes import GPUQueueSendOp, GPUQueueRecvOp\n \n from ngraph.transformers.passes.layout import LayoutAssignment, BinaryLayoutConstraint, \\\n UnaryLayoutConstraint"
}
] |
ngraph | 0d95923d9b8be2a55c77f7b0e6c8bc8e5860cc6c | d6da293db87cafcaf8ff98add1b571429c1bf9d0 | ngraph/transformers/cputransform.py | https://github.com/rsumner31/ngraph | true | false | true | @@ -571,7 +571,7 @@ class CPUCodeGenerator(PyGen):
@generate_op.on_type(CPUQueueRecvOp)
def generate_op(self, op, out, *args):
recv_id = len(self.recv_nodes)
- self.recv_nodes[recv_id] = op
+ self.recv_nodes.append(op)
self.append("update_a_{}(self.recv_from_queue_send({}))",
out.tensor_description.name, recv_id)
| self . recv_nodes [ recv_id ] = op | self . recv_nodes . append ( op ) | SINGLE_STMT | [["Insert", ["expression_statement", 3, 9, 3, 38], ["call", "N0"], 0], ["Insert", "N0", ["attribute", "N1"], 0], ["Insert", "N0", ["argument_list", "N2"], 1], ["Move", "N1", ["attribute", 3, 9, 3, 24], 0], ["Insert", "N1", [".:.", "T"], 1], ["Update", ["identifier:recv_id", 3, 25, 3, 32], "append"], ["Move", "N1", ["identifier:recv_id", 3, 25, 3, 32], 2], ["Insert", "N2", ["(:(", "T"], 0], ["Move", "N2", ["identifier:op", 3, 36, 3, 38], 1], ["Insert", "N2", ["):)", "T"], 2], ["Delete", ["[:[", 3, 24, 3, 25]], ["Delete", ["]:]", 3, 32, 3, 33]], ["Delete", ["subscript", 3, 9, 3, 33]], ["Delete", ["=:=", 3, 34, 3, 35]], ["Delete", ["assignment", 3, 9, 3, 38]]] | rsumner31/ngraph@0d95923d9b8be2a55c77f7b0e6c8bc8e5860cc6c | fix missing append | [
{
"sha": "b5f714ca1f155eba840233e071d7875bedca78e2",
"filename": "ngraph/transformers/cputransform.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/rsumner31/ngraph/blob/0d95923d9b8be2a55c77f7b0e6c8bc8e5860cc6c/ngraph%2Ftransformers%2Fcputransform.py",
"raw_url": "https://github.com/rsumner31/ngraph/raw/0d95923d9b8be2a55c77f7b0e6c8bc8e5860cc6c/ngraph%2Ftransformers%2Fcputransform.py",
"contents_url": "https://api.github.com/repos/rsumner31/ngraph/contents/ngraph%2Ftransformers%2Fcputransform.py?ref=0d95923d9b8be2a55c77f7b0e6c8bc8e5860cc6c",
"patch": "@@ -571,7 +571,7 @@ def generate_op(self, op, out, *args):\n @generate_op.on_type(CPUQueueRecvOp)\n def generate_op(self, op, out, *args):\n recv_id = len(self.recv_nodes)\n- self.recv_nodes[recv_id] = op\n+ self.recv_nodes.append(op)\n self.append(\"update_a_{}(self.recv_from_queue_send({}))\",\n out.tensor_description.name, recv_id)\n "
}
] |
ngraph | f56015b3a50d093491ebb8f2d5a95dd549571b4e | 28f03846b213239c328b3e28ef13e0271f3f6b11 | ngraph/op_graph/ctc.py | https://github.com/rsumner31/ngraph | true | false | false | @@ -66,7 +66,7 @@ class CTCOp(TensorOp):
raise ValueError('activations must have a recurrent axis')
if len(labels.shape) != 1:
- raise ValueError(('labels 1must have 1 dimension, '
+ raise ValueError(('labels must have 1 dimension, '
'found {}').format(len(labels.shape)))
if len(activation_lens.shape) != 1:
| raise ValueError ( ( 'labels 1must have 1 dimension, ' 'found {}' ) . format ( len ( labels . shape ) ) ) | raise ValueError ( ( 'labels must have 1 dimension, ' 'found {}' ) . format ( len ( labels . shape ) ) ) | CHANGE_STRING_LITERAL | [["Update", ["string:'labels 1must have 1 dimension, '", 3, 31, 3, 64], "'labels must have 1 dimension, '"]] | rsumner31/ngraph@f56015b3a50d093491ebb8f2d5a95dd549571b4e | Fix typo in ctc.py | [
{
"sha": "9f029c7dfe4d4ba13dcc039e11d5debfc5bb78bd",
"filename": "ngraph/op_graph/ctc.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/rsumner31/ngraph/blob/f56015b3a50d093491ebb8f2d5a95dd549571b4e/ngraph%2Fop_graph%2Fctc.py",
"raw_url": "https://github.com/rsumner31/ngraph/raw/f56015b3a50d093491ebb8f2d5a95dd549571b4e/ngraph%2Fop_graph%2Fctc.py",
"contents_url": "https://api.github.com/repos/rsumner31/ngraph/contents/ngraph%2Fop_graph%2Fctc.py?ref=f56015b3a50d093491ebb8f2d5a95dd549571b4e",
"patch": "@@ -66,7 +66,7 @@ def __init__(self, activations, labels, activation_lens, label_lens, grads,\n raise ValueError('activations must have a recurrent axis')\n \n if len(labels.shape) != 1:\n- raise ValueError(('labels 1must have 1 dimension, '\n+ raise ValueError(('labels must have 1 dimension, '\n 'found {}').format(len(labels.shape)))\n \n if len(activation_lens.shape) != 1:"
}
] |
ngraph | ef393b6e9a02409d31357fe4fb48c5d691c19519 | e80b4f19945d70b0be7eb18b572fdefda4d0dc32 | ngraph/frontends/tensorflow/tests/importer_tester.py | https://github.com/rsumner31/ngraph | true | false | false | @@ -85,7 +85,7 @@ class ImporterTester(object):
# assert
assert tf_result.shape == ng_result.shape
- assert ng.testing.allclose(tf_result, ng_result, rtol=rtol, atol=atol)
+ ng.testing.assert_allclose(tf_result, ng_result, rtol=rtol, atol=atol,err_msg='Tensorflow.Importer.Tester.run',verbose=True)
def ng_run(self,
tf_target_node,
| assert ng . testing . allclose ( tf_result , ng_result , rtol = rtol , atol = atol ) | ng . testing . assert_allclose ( tf_result , ng_result , rtol = rtol , atol = atol , err_msg = 'Tensorflow.Importer.Tester.run' , verbose = True ) | SINGLE_STMT | [["Insert", ["module", 1, 9, 7, 0], ["expression_statement", "N0"], 1], ["Move", "N0", ["call", 3, 16, 3, 79], 0], ["Update", ["identifier:allclose", 3, 27, 3, 35], "assert_allclose"], ["Insert", ["argument_list", 3, 35, 3, 79], [",:,", "T"], 8], ["Insert", ["argument_list", 3, 35, 3, 79], ["keyword_argument", "N1"], 9], ["Insert", ["argument_list", 3, 35, 3, 79], [",:,", "T"], 10], ["Insert", ["argument_list", 3, 35, 3, 79], ["keyword_argument", "N2"], 11], ["Insert", "N1", ["identifier:err_msg", "T"], 0], ["Insert", "N1", ["=:=", "T"], 1], ["Insert", "N1", ["string:'Tensorflow.Importer.Tester.run'", "T"], 2], ["Insert", "N2", ["identifier:verbose", "T"], 0], ["Insert", "N2", ["=:=", "T"], 1], ["Insert", "N2", ["true:True", "T"], 2], ["Delete", ["assert:assert", 3, 9, 3, 15]], ["Delete", ["assert_statement", 3, 9, 3, 79]]] | rsumner31/ngraph@ef393b6e9a02409d31357fe4fb48c5d691c19519 | replaced ng.testing.allclose with ng.testing.assert_allclose for importer_tester for tensorflow to improve debugging capabilities for an integration test failure to resolve issue #1331 | [
{
"sha": "8f5df3e88f3cfae8631602eefe70454ac61120e9",
"filename": "ngraph/frontends/tensorflow/tests/importer_tester.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/rsumner31/ngraph/blob/ef393b6e9a02409d31357fe4fb48c5d691c19519/ngraph%2Ffrontends%2Ftensorflow%2Ftests%2Fimporter_tester.py",
"raw_url": "https://github.com/rsumner31/ngraph/raw/ef393b6e9a02409d31357fe4fb48c5d691c19519/ngraph%2Ffrontends%2Ftensorflow%2Ftests%2Fimporter_tester.py",
"contents_url": "https://api.github.com/repos/rsumner31/ngraph/contents/ngraph%2Ffrontends%2Ftensorflow%2Ftests%2Fimporter_tester.py?ref=ef393b6e9a02409d31357fe4fb48c5d691c19519",
"patch": "@@ -85,7 +85,7 @@ def run(self,\n \n # assert\n assert tf_result.shape == ng_result.shape\n- assert ng.testing.allclose(tf_result, ng_result, rtol=rtol, atol=atol)\n+ ng.testing.assert_allclose(tf_result, ng_result, rtol=rtol, atol=atol,err_msg='Tensorflow.Importer.Tester.run',verbose=True)\n \n def ng_run(self,\n tf_target_node,"
}
] |
ngraph | b700bb887b4482747174ff484bfe0ee82d1faba4 | d08b45483c0d77522174feb1c4b526e013ad54f7 | ngraph/transformers/base.py | https://github.com/rsumner31/ngraph | true | false | true | @@ -334,7 +334,7 @@ class Transformer(with_metaclass(Transformer_ABC_Meta, object)):
- if position:
+ if position is not None:
self.graph_passes.insert(position, graph_pass)
else:
self.graph_passes.append(graph_pass)
| if position : self . graph_passes . insert ( position , graph_pass ) else : self . graph_passes . append ( graph_pass ) | if position is not None : self . graph_passes . insert ( position , graph_pass ) else : self . graph_passes . append ( graph_pass ) | SINGLE_STMT | [["Insert", ["if_statement", 0, 9, 3, 49], ["comparison_operator", "N0"], 1], ["Move", "N0", ["identifier:position", 0, 12, 0, 20], 0], ["Insert", "N0", ["is:is", "T"], 1], ["Insert", "N0", ["not:not", "T"], 2], ["Insert", "N0", ["none:None", "T"], 3]] | rsumner31/ngraph@b700bb887b4482747174ff484bfe0ee82d1faba4 | fix logic for default (None) insert position #1486 (#1534) | [
{
"sha": "0f7779b5f69d3c82f93536e4aede515e855ea14a",
"filename": "ngraph/transformers/base.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/rsumner31/ngraph/blob/b700bb887b4482747174ff484bfe0ee82d1faba4/ngraph%2Ftransformers%2Fbase.py",
"raw_url": "https://github.com/rsumner31/ngraph/raw/b700bb887b4482747174ff484bfe0ee82d1faba4/ngraph%2Ftransformers%2Fbase.py",
"contents_url": "https://api.github.com/repos/rsumner31/ngraph/contents/ngraph%2Ftransformers%2Fbase.py?ref=b700bb887b4482747174ff484bfe0ee82d1faba4",
"patch": "@@ -334,7 +334,7 @@ def register_graph_pass(self, graph_pass, position=None):\n graph_pass (): The pass to register\n position (int): insert index in the list of passes, append by default\n \"\"\"\n- if position:\n+ if position is not None:\n self.graph_passes.insert(position, graph_pass)\n else:\n self.graph_passes.append(graph_pass)"
}
] |
ngraph | e01e046d1a34841bc613d0ea4cb9b80a44c0362e | e4d96190dc8eb2995937a24cc4687bca85d9f373 | tests/test_comm_nodes.py | https://github.com/rsumner31/ngraph | true | false | false | @@ -102,7 +102,7 @@ def test_calculate_new_axes_null_parallel_axis():
metadata=dict(device='cpu', device_id='0', transformer='cpu0')),
ng.Op(metadata=dict(device='cpu', device_id=('1', '2'), parallel=ax_C,
transformer=['cpu1', 'cpu2'])),
- 'direct'
+ 'broadcast'
),
(
ng.Op(metadata=dict(device='cpu', device_id=('1', '2'), parallel=ax_C,
| 'direct' | 'broadcast' | CHANGE_STRING_LITERAL | [["Update", ["string:'direct'", 3, 9, 3, 17], "'broadcast'"]] | rsumner31/ngraph@e01e046d1a34841bc613d0ea4cb9b80a44c0362e | Fix for jenkins build | [
{
"sha": "147835982c90f0b223ccc8b76ceecdf38acea19c",
"filename": "tests/test_comm_nodes.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/rsumner31/ngraph/blob/e01e046d1a34841bc613d0ea4cb9b80a44c0362e/tests%2Ftest_comm_nodes.py",
"raw_url": "https://github.com/rsumner31/ngraph/raw/e01e046d1a34841bc613d0ea4cb9b80a44c0362e/tests%2Ftest_comm_nodes.py",
"contents_url": "https://api.github.com/repos/rsumner31/ngraph/contents/tests%2Ftest_comm_nodes.py?ref=e01e046d1a34841bc613d0ea4cb9b80a44c0362e",
"patch": "@@ -102,7 +102,7 @@ def test_calculate_new_axes_null_parallel_axis():\n metadata=dict(device='cpu', device_id='0', transformer='cpu0')),\n ng.Op(metadata=dict(device='cpu', device_id=('1', '2'), parallel=ax_C,\n transformer=['cpu1', 'cpu2'])),\n- 'direct'\n+ 'broadcast'\n ),\n (\n ng.Op(metadata=dict(device='cpu', device_id=('1', '2'), parallel=ax_C,"
}
] |
ngraph | ee524d98997be181d45bfcf3cc149a728f13f4e1 | d6824ee47c70604f1acfc1419ef0c4fafac21aa2 | ngraph/transformers/hetrtransform.py | https://github.com/rsumner31/ngraph | true | false | true | @@ -305,7 +305,7 @@ class HetrTransformer(ComputationGraphTransformer):
self.child_transformers = dict()
self.send_nodes = OrderedSet()
self.graph_passes = [DeviceAssignPass(hetr=self,
- default_device='gpu',
+ default_device='cpu',
default_device_id=0),
CommunicationPass(self.send_nodes),
DistributedPass(self.send_nodes)]
| self . graph_passes = [ DeviceAssignPass ( hetr = self , default_device = 'gpu' , default_device_id = 0 ) , CommunicationPass ( self . send_nodes ) , DistributedPass ( self . send_nodes ) ] | self . graph_passes = [ DeviceAssignPass ( hetr = self , default_device = 'cpu' , default_device_id = 0 ) , CommunicationPass ( self . send_nodes ) , DistributedPass ( self . send_nodes ) ] | CHANGE_STRING_LITERAL | [["Update", ["string:'gpu'", 3, 62, 3, 67], "'cpu'"]] | rsumner31/ngraph@ee524d98997be181d45bfcf3cc149a728f13f4e1 | revert default device in hetrtransform to cpu | [
{
"sha": "88b2063f57f344780cb32ad8f599a88ec4affc3d",
"filename": "ngraph/transformers/hetrtransform.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/rsumner31/ngraph/blob/ee524d98997be181d45bfcf3cc149a728f13f4e1/ngraph%2Ftransformers%2Fhetrtransform.py",
"raw_url": "https://github.com/rsumner31/ngraph/raw/ee524d98997be181d45bfcf3cc149a728f13f4e1/ngraph%2Ftransformers%2Fhetrtransform.py",
"contents_url": "https://api.github.com/repos/rsumner31/ngraph/contents/ngraph%2Ftransformers%2Fhetrtransform.py?ref=ee524d98997be181d45bfcf3cc149a728f13f4e1",
"patch": "@@ -305,7 +305,7 @@ def __init__(self, **kwargs):\n self.child_transformers = dict()\n self.send_nodes = OrderedSet()\n self.graph_passes = [DeviceAssignPass(hetr=self,\n- default_device='gpu',\n+ default_device='cpu',\n default_device_id=0),\n CommunicationPass(self.send_nodes),\n DistributedPass(self.send_nodes)]"
}
] |
ngraph | ab798788d5b9d59790aab6f0705448190e2a748a | d4958d47e11b6f815d952a7e5c39ceab97cf347c | ngraph/frontends/neon/layer.py | https://github.com/rsumner31/ngraph | true | false | true | @@ -604,7 +604,7 @@ class Bias(Layer):
@SubGraph.scope_op_creation
def __call__(self, in_obj):
if not self.initialized:
- w_axes = in_obj.axes.sample_axes()
+ w_axes = in_obj.axes.feature_axes()
if self.shared and in_obj.axes.channel_axis() is not None:
w_axes = ng.make_axes(in_obj.axes.channel_axis())
self.W = ng.variable(axes=w_axes, initial_value=self.init,
| w_axes = in_obj . axes . sample_axes ( ) | w_axes = in_obj . axes . feature_axes ( ) | WRONG_FUNCTION_NAME | [["Update", ["identifier:sample_axes", 3, 34, 3, 45], "feature_axes"]] | rsumner31/ngraph@ab798788d5b9d59790aab6f0705448190e2a748a | fix neon Bias - should not include REC axis | [
{
"sha": "2beba17a5e5bcc8cf002d82a95db2fbd0cbf093a",
"filename": "ngraph/frontends/neon/layer.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/rsumner31/ngraph/blob/ab798788d5b9d59790aab6f0705448190e2a748a/ngraph%2Ffrontends%2Fneon%2Flayer.py",
"raw_url": "https://github.com/rsumner31/ngraph/raw/ab798788d5b9d59790aab6f0705448190e2a748a/ngraph%2Ffrontends%2Fneon%2Flayer.py",
"contents_url": "https://api.github.com/repos/rsumner31/ngraph/contents/ngraph%2Ffrontends%2Fneon%2Flayer.py?ref=ab798788d5b9d59790aab6f0705448190e2a748a",
"patch": "@@ -604,7 +604,7 @@ def __init__(self, init, shared=True, **kwargs):\n @SubGraph.scope_op_creation\n def __call__(self, in_obj):\n if not self.initialized:\n- w_axes = in_obj.axes.sample_axes()\n+ w_axes = in_obj.axes.feature_axes()\n if self.shared and in_obj.axes.channel_axis() is not None:\n w_axes = ng.make_axes(in_obj.axes.channel_axis())\n self.W = ng.variable(axes=w_axes, initial_value=self.init,"
}
] |
ngraph | 95f4403d6c91a13de2a997f1caf0bbef0bd0d504 | 1c848d1f8f24fc6d683108581a34916bf0a7420d | conftest.py | https://github.com/rsumner31/ngraph | true | false | true | @@ -75,7 +75,7 @@ def pytest_configure(config):
# when marking argon_disabled for a whole test, but flex_disabled only on one
# parametrized version of that test, the argon marking disappeared
- config.flex_and_argon_disabled = pytest.mark.xfail(config.getvalue("transformer") == "flex" or
+ config.flex_and_argon_disabled = pytest.mark.xfail(config.getvalue("transformer") == "flexgpu" or
config.getvalue("transformer") == "argon",
reason="Not supported by argon or flex backend",
strict=True)
| config . flex_and_argon_disabled = pytest . mark . xfail ( config . getvalue ( "transformer" ) == "flex" or config . getvalue ( "transformer" ) == "argon" , reason = "Not supported by argon or flex backend" , strict = True ) | config . flex_and_argon_disabled = pytest . mark . xfail ( config . getvalue ( "transformer" ) == "flexgpu" or config . getvalue ( "transformer" ) == "argon" , reason = "Not supported by argon or flex backend" , strict = True ) | CHANGE_STRING_LITERAL | [["Update", ["string:\"flex\"", 3, 90, 3, 96], "\"flexgpu\""]] | rsumner31/ngraph@95f4403d6c91a13de2a997f1caf0bbef0bd0d504 | Fix typo in flex transformer name | [
{
"sha": "648ecabcd730f02f3e69f410326b1c32514d91e2",
"filename": "conftest.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/rsumner31/ngraph/blob/95f4403d6c91a13de2a997f1caf0bbef0bd0d504/conftest.py",
"raw_url": "https://github.com/rsumner31/ngraph/raw/95f4403d6c91a13de2a997f1caf0bbef0bd0d504/conftest.py",
"contents_url": "https://api.github.com/repos/rsumner31/ngraph/contents/conftest.py?ref=95f4403d6c91a13de2a997f1caf0bbef0bd0d504",
"patch": "@@ -75,7 +75,7 @@ def pytest_configure(config):\n \n # when marking argon_disabled for a whole test, but flex_disabled only on one\n # parametrized version of that test, the argon marking disappeared\n- config.flex_and_argon_disabled = pytest.mark.xfail(config.getvalue(\"transformer\") == \"flex\" or\n+ config.flex_and_argon_disabled = pytest.mark.xfail(config.getvalue(\"transformer\") == \"flexgpu\" or\n config.getvalue(\"transformer\") == \"argon\",\n reason=\"Not supported by argon or flex backend\",\n strict=True)"
}
] |
ngraph | 388d2f25fce3bf20bb87f60cc961eaac17604afa | 311188a2c42f2baa13a7af215c83e7669f07019b | examples/resnet/resnet.py | https://github.com/rsumner31/ngraph | true | false | true | @@ -64,7 +64,7 @@ class ResidualModule(object):
#Calculate outputs of convolution
convs=self.main_path(in_obj)
#Divide input half for size matching
- identity_conn=self.side_path(in_obj)
+ identity_conn=self.side_path(in_obj) if self.side_path else in_obj
#Add convs output with identity_conn
sum_opt=convs+identity_conn
#Perform relu on sum output
| identity_conn = self . side_path ( in_obj ) | identity_conn = self . side_path ( in_obj ) if self . side_path else in_obj | SINGLE_STMT | [["Insert", ["assignment", 3, 13, 3, 49], ["conditional_expression", "N0"], 2], ["Move", "N0", ["call", 3, 27, 3, 49], 0], ["Insert", "N0", ["if:if", "T"], 1], ["Insert", "N0", ["attribute", "N1"], 2], ["Insert", "N0", ["else:else", "T"], 3], ["Insert", "N0", ["identifier:in_obj", "T"], 4], ["Insert", "N1", ["identifier:self", "T"], 0], ["Insert", "N1", [".:.", "T"], 1], ["Insert", "N1", ["identifier:side_path", "T"], 2]] | rsumner31/ngraph@388d2f25fce3bf20bb87f60cc961eaac17604afa | Fixed the none path | [
{
"sha": "205ead509365ed6628ee4b3cc6eef6ad17b39ca6",
"filename": "examples/resnet/resnet.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/rsumner31/ngraph/blob/388d2f25fce3bf20bb87f60cc961eaac17604afa/examples%2Fresnet%2Fresnet.py",
"raw_url": "https://github.com/rsumner31/ngraph/raw/388d2f25fce3bf20bb87f60cc961eaac17604afa/examples%2Fresnet%2Fresnet.py",
"contents_url": "https://api.github.com/repos/rsumner31/ngraph/contents/examples%2Fresnet%2Fresnet.py?ref=388d2f25fce3bf20bb87f60cc961eaac17604afa",
"patch": "@@ -64,7 +64,7 @@ def __call__(self,in_obj):\n #Calculate outputs of convolution\n convs=self.main_path(in_obj)\n #Divide input half for size matching\n- identity_conn=self.side_path(in_obj)\n+ identity_conn=self.side_path(in_obj) if self.side_path else in_obj\n #Add convs output with identity_conn\n sum_opt=convs+identity_conn\n #Perform relu on sum output"
}
] |
ngraph | 90848cb4184f441cfe73080fb5c9dc1f91e7d607 | e60c14129e01f65cbc40489ac3a1f40471835083 | conftest.py | https://github.com/rsumner31/ngraph | true | false | true | @@ -75,7 +75,7 @@ def pytest_configure(config):
# when marking argon_disabled for a whole test, but flex_disabled only on one
# parametrized version of that test, the argon marking disappeared
- config.flex_and_argon_disabled = pytest.mark.xfail(config.getvalue("transformer") == "flex" or
+ config.flex_and_argon_disabled = pytest.mark.xfail(config.getvalue("transformer") == "flexgpu" or
config.getvalue("transformer") == "argon",
reason="Not supported by argon or flex backend",
strict=True)
| config . flex_and_argon_disabled = pytest . mark . xfail ( config . getvalue ( "transformer" ) == "flex" or config . getvalue ( "transformer" ) == "argon" , reason = "Not supported by argon or flex backend" , strict = True ) | config . flex_and_argon_disabled = pytest . mark . xfail ( config . getvalue ( "transformer" ) == "flexgpu" or config . getvalue ( "transformer" ) == "argon" , reason = "Not supported by argon or flex backend" , strict = True ) | CHANGE_STRING_LITERAL | [["Update", ["string:\"flex\"", 3, 90, 3, 96], "\"flexgpu\""]] | rsumner31/ngraph@90848cb4184f441cfe73080fb5c9dc1f91e7d607 | Fix typo in flex transformer name | [
{
"sha": "648ecabcd730f02f3e69f410326b1c32514d91e2",
"filename": "conftest.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/rsumner31/ngraph/blob/90848cb4184f441cfe73080fb5c9dc1f91e7d607/conftest.py",
"raw_url": "https://github.com/rsumner31/ngraph/raw/90848cb4184f441cfe73080fb5c9dc1f91e7d607/conftest.py",
"contents_url": "https://api.github.com/repos/rsumner31/ngraph/contents/conftest.py?ref=90848cb4184f441cfe73080fb5c9dc1f91e7d607",
"patch": "@@ -75,7 +75,7 @@ def pytest_configure(config):\n \n # when marking argon_disabled for a whole test, but flex_disabled only on one\n # parametrized version of that test, the argon marking disappeared\n- config.flex_and_argon_disabled = pytest.mark.xfail(config.getvalue(\"transformer\") == \"flex\" or\n+ config.flex_and_argon_disabled = pytest.mark.xfail(config.getvalue(\"transformer\") == \"flexgpu\" or\n config.getvalue(\"transformer\") == \"argon\",\n reason=\"Not supported by argon or flex backend\",\n strict=True)"
}
] |
ngraph | facba05c5849e3555f2e4cb98b8017c2734fc2ff | 6054ea22a08f02ba7995dae4caf6bc74b96fefe0 | examples/resnet/resnet.py | https://github.com/rsumner31/ngraph | true | false | true | @@ -64,7 +64,7 @@ class ResidualModule(object):
#Calculate outputs of convolution
convs=self.main_path(in_obj)
#Divide input half for size matching
- identity_conn=self.side_path(in_obj)
+ identity_conn=self.side_path(in_obj) if self.side_path else in_obj
#Add convs output with identity_conn
sum_opt=convs+identity_conn
#Perform relu on sum output
| identity_conn = self . side_path ( in_obj ) | identity_conn = self . side_path ( in_obj ) if self . side_path else in_obj | SINGLE_STMT | [["Insert", ["assignment", 3, 13, 3, 49], ["conditional_expression", "N0"], 2], ["Move", "N0", ["call", 3, 27, 3, 49], 0], ["Insert", "N0", ["if:if", "T"], 1], ["Insert", "N0", ["attribute", "N1"], 2], ["Insert", "N0", ["else:else", "T"], 3], ["Insert", "N0", ["identifier:in_obj", "T"], 4], ["Insert", "N1", ["identifier:self", "T"], 0], ["Insert", "N1", [".:.", "T"], 1], ["Insert", "N1", ["identifier:side_path", "T"], 2]] | rsumner31/ngraph@facba05c5849e3555f2e4cb98b8017c2734fc2ff | Fixed the none path | [
{
"sha": "205ead509365ed6628ee4b3cc6eef6ad17b39ca6",
"filename": "examples/resnet/resnet.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/rsumner31/ngraph/blob/facba05c5849e3555f2e4cb98b8017c2734fc2ff/examples%2Fresnet%2Fresnet.py",
"raw_url": "https://github.com/rsumner31/ngraph/raw/facba05c5849e3555f2e4cb98b8017c2734fc2ff/examples%2Fresnet%2Fresnet.py",
"contents_url": "https://api.github.com/repos/rsumner31/ngraph/contents/examples%2Fresnet%2Fresnet.py?ref=facba05c5849e3555f2e4cb98b8017c2734fc2ff",
"patch": "@@ -64,7 +64,7 @@ def __call__(self,in_obj):\n #Calculate outputs of convolution\n convs=self.main_path(in_obj)\n #Divide input half for size matching\n- identity_conn=self.side_path(in_obj)\n+ identity_conn=self.side_path(in_obj) if self.side_path else in_obj\n #Add convs output with identity_conn\n sum_opt=convs+identity_conn\n #Perform relu on sum output"
}
] |
ngraph | b40a38199f39b8b29b3901f8321ff5e32fa5a414 | 123d267185796fca32422b25ec63c7cc97b471ba | ngraph/frontends/neon/data/tsp.py | https://github.com/rsumner31/ngraph | true | false | true | @@ -47,7 +47,7 @@ class TSP(object):
if not os.path.exists(filepath):
for file_name, file_id in GOOGLE_DRIVE_IDS.items():
destination = './' + file_name
- print('\nDownloading and unzipped traveling salesman data {} released '
+ print('\nDownloading and unzipping traveling salesman data {} released '
'with Pointer Networks paper\n'.format(file_name))
self.download_file_from_google_drive(file_id, destination)
with zipfile.ZipFile(destination, 'r') as z:
| print ( '\nDownloading and unzipped traveling salesman data {} released ' 'with Pointer Networks paper\n' . format ( file_name ) ) | print ( '\nDownloading and unzipping traveling salesman data {} released ' 'with Pointer Networks paper\n' . format ( file_name ) ) | CHANGE_STRING_LITERAL | [["Update", ["string:'\\nDownloading and unzipped traveling salesman data {} released '", 3, 27, 3, 92], "'\\nDownloading and unzipping traveling salesman data {} released '"]] | rsumner31/ngraph@b40a38199f39b8b29b3901f8321ff5e32fa5a414 | fix typo | [
{
"sha": "4105dbb62f7856815fe157aca68c1748125a237f",
"filename": "ngraph/frontends/neon/data/tsp.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/rsumner31/ngraph/blob/b40a38199f39b8b29b3901f8321ff5e32fa5a414/ngraph%2Ffrontends%2Fneon%2Fdata%2Ftsp.py",
"raw_url": "https://github.com/rsumner31/ngraph/raw/b40a38199f39b8b29b3901f8321ff5e32fa5a414/ngraph%2Ffrontends%2Fneon%2Fdata%2Ftsp.py",
"contents_url": "https://api.github.com/repos/rsumner31/ngraph/contents/ngraph%2Ffrontends%2Fneon%2Fdata%2Ftsp.py?ref=b40a38199f39b8b29b3901f8321ff5e32fa5a414",
"patch": "@@ -47,7 +47,7 @@ def load_data(self):\n if not os.path.exists(filepath):\n for file_name, file_id in GOOGLE_DRIVE_IDS.items():\n destination = './' + file_name\n- print('\\nDownloading and unzipped traveling salesman data {} released '\n+ print('\\nDownloading and unzipping traveling salesman data {} released '\n 'with Pointer Networks paper\\n'.format(file_name))\n self.download_file_from_google_drive(file_id, destination)\n with zipfile.ZipFile(destination, 'r') as z:"
}
] |
ngraph | 91e11c22efa6db1e650de2c020e103a95a96ec98 | 26cb755c847699f79d15fe315f5cb863e04817b3 | ngraph/transformers/cputransform.py | https://github.com/rsumner31/ngraph | true | false | false | @@ -822,7 +822,7 @@ class CPUTransformer(ExecutionGraphTransformer):
import imp
try:
imp.find_module('mlsl')
- use_mlsl = True
+ use_mlsl = False
except ImportError:
use_mlsl = False
| use_mlsl = True | use_mlsl = False | CHANGE_BOOLEAN_LITERAL | [["Insert", ["assignment", 3, 9, 3, 24], ["false:False", "T"], 2], ["Delete", ["true:True", 3, 20, 3, 24]]] | rsumner31/ngraph@91e11c22efa6db1e650de2c020e103a95a96ec98 | MLSL: disabled mlsl-related code in CpuTransformer to avoid issues with new docker image with mlsl installed | [
{
"sha": "c7926b28a37fb2952c0e3fc74c49fe4b33e09679",
"filename": "ngraph/transformers/cputransform.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/rsumner31/ngraph/blob/91e11c22efa6db1e650de2c020e103a95a96ec98/ngraph%2Ftransformers%2Fcputransform.py",
"raw_url": "https://github.com/rsumner31/ngraph/raw/91e11c22efa6db1e650de2c020e103a95a96ec98/ngraph%2Ftransformers%2Fcputransform.py",
"contents_url": "https://api.github.com/repos/rsumner31/ngraph/contents/ngraph%2Ftransformers%2Fcputransform.py?ref=91e11c22efa6db1e650de2c020e103a95a96ec98",
"patch": "@@ -822,7 +822,7 @@ class CPUTransformer(ExecutionGraphTransformer):\n import imp\n try:\n imp.find_module('mlsl')\n- use_mlsl = True\n+ use_mlsl = False\n except ImportError:\n use_mlsl = False\n "
}
] |
matplotlib | f50427e1ac93ec74d03802196d0d7076a7016a53 | 9f51a843835602df3f732a1fd1e4f348f4e93834 | setupext.py | https://github.com/dsquareindia/matplotlib | true | false | false | @@ -35,7 +35,7 @@ basedir = {
'win32' : ['win32_static',],
'linux2' : ['/usr/local', '/usr',],
'linux' : ['/usr/local', '/usr',],
- 'darwin' : [os.getenv('MBLIB_BASE') or '/usr/local', '/usr', '/sw'],
+ 'darwin' : [os.getenv('MPLIB_BASE') or '/usr/local', '/usr', '/sw'],
'sunos5' : [os.getenv('MPLIB_BASE') or '/usr/local',],
}
| 'darwin' : [ os . getenv ( 'MBLIB_BASE' ) or '/usr/local' , '/usr' , '/sw' ] , | 'darwin' : [ os . getenv ( 'MPLIB_BASE' ) or '/usr/local' , '/usr' , '/sw' ] , | CHANGE_STRING_LITERAL | [["Update", ["string:'MBLIB_BASE'", 3, 27, 3, 39], "'MPLIB_BASE'"]] | dsquareindia/matplotlib@f50427e1ac93ec74d03802196d0d7076a7016a53 | null | null |
matplotlib | 7ea99a1de70e2579ecb695dc0bc60f4b4ebb63b7 | 10450d04f0d9386ed3810e69824eae3e65629b3b | lib/matplotlib/cbook.py | https://github.com/dsquareindia/matplotlib | true | false | true | @@ -176,7 +176,7 @@ class silent_list(list):
def strip_math(s):
'remove latex formatting from mathtext'
- remove = (r'\rm', '\cal', '\tt', '\it', '\\', '{', '}')
+ remove = (r'\mathdefault', r'\rm', r'\cal', r'\tt', r'\it', '\\', '{', '}')
s = s[1:-1]
for r in remove: s = s.replace(r,'')
return s
| remove = ( r'\rm' , '\cal' , '\tt' , '\it' , '\\' , '{' , '}' ) | remove = ( r'\mathdefault' , r'\rm' , r'\cal' , r'\tt' , r'\it' , '\\' , '{' , '}' ) | SINGLE_STMT | [["Move", [",:,", 3, 29, 3, 30], ["tuple", 3, 14, 3, 60], 1], ["Move", [",:,", 3, 36, 3, 37], ["tuple", 3, 14, 3, 60], 2], ["Move", [",:,", 3, 49, 3, 50], ["tuple", 3, 14, 3, 60], 4], ["Move", [",:,", 3, 54, 3, 55], ["tuple", 3, 14, 3, 60], 6], ["Insert", ["tuple", 3, 14, 3, 60], ["string:r'\\mathdefault'", "T"], 1], ["Update", ["string:'\\cal'", 3, 23, 3, 29], "r'\\cal'"], ["Update", ["string:'\\tt'", 3, 31, 3, 36], "r'\\tt'"], ["Update", ["string:'\\it'", 3, 38, 3, 43], "r'\\it'"], ["Insert", ["tuple", 3, 14, 3, 60], [",:,", "T"], 12], ["Insert", ["tuple", 3, 14, 3, 60], [",:,", "T"], 15], ["Delete", [",:,", 3, 21, 3, 22]]] | dsquareindia/matplotlib@7ea99a1de70e2579ecb695dc0bc60f4b4ebb63b7 | null | null |
matplotlib | 21e030fbfae33fb4429aafc880514f039016f69f | 674c8954ae6ea422f207fde0827ade7672a47fc0 | setupext.py | https://github.com/dsquareindia/matplotlib | true | false | false | @@ -51,7 +51,7 @@ basedir = {
'linux' : ['/usr/local', '/usr',],
'cygwin' : ['/usr/local', '/usr',],
'darwin' : ['/sw/lib/freetype2', '/sw/lib/freetype219', '/usr/local',
- '/usr', '/sw'],
+ '/usr', '/sw', '/usr/X11R6'],
'freebsd4' : ['/usr/local', '/usr'],
'freebsd5' : ['/usr/local', '/usr'],
'freebsd6' : ['/usr/local', '/usr'],
| 'darwin' : [ '/sw/lib/freetype2' , '/sw/lib/freetype219' , '/usr/local' , '/usr' , '/sw' ] , | 'darwin' : [ '/sw/lib/freetype2' , '/sw/lib/freetype219' , '/usr/local' , '/usr' , '/sw' , '/usr/X11R6' ] , | SINGLE_STMT | [["Insert", ["subscript", 2, 5, 3, 31], [",:,", "T"], 12], ["Insert", ["subscript", 2, 5, 3, 31], ["string:'/usr/X11R6'", "T"], 13]] | dsquareindia/matplotlib@21e030fbfae33fb4429aafc880514f039016f69f | null | null |
candle | 89871277de2e462a836e614ad2bf4c6c24f56874 | d97391eb24a18ad13b60f3a506370aab9054d61c | candle/quantize.py | https://github.com/castorini/candle | true | false | true | @@ -14,7 +14,7 @@ from .proxy import *
def linear_quant(x, bits, min=-6, max=6):
range = max - min
- step = range / 2**bits
+ step = range / (2**bits - 1)
quantized = hard_round(x / step) * step
quantized.data.clamp_(min, max)
return quantized
| step = range / 2 ** bits | step = range / ( 2 ** bits - 1 ) | CHANGE_BINARY_OPERAND | [["Insert", ["binary_operator", 3, 12, 3, 27], ["parenthesized_expression", "N0"], 2], ["Insert", "N0", ["(:(", "T"], 0], ["Insert", "N0", ["binary_operator", "N1"], 1], ["Insert", "N0", ["):)", "T"], 2], ["Move", "N1", ["binary_operator", 3, 20, 3, 27], 0], ["Insert", "N1", ["-:-", "T"], 1], ["Insert", "N1", ["integer:1", "T"], 2]] | castorini/candle@89871277de2e462a836e614ad2bf4c6c24f56874 | Fix off-by-one error | [
{
"sha": "498f0c738a85233fd168c1ea4d68ea6f72e163aa",
"filename": "candle/quantize.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/castorini/candle/blob/89871277de2e462a836e614ad2bf4c6c24f56874/candle%2Fquantize.py",
"raw_url": "https://github.com/castorini/candle/raw/89871277de2e462a836e614ad2bf4c6c24f56874/candle%2Fquantize.py",
"contents_url": "https://api.github.com/repos/castorini/candle/contents/candle%2Fquantize.py?ref=89871277de2e462a836e614ad2bf4c6c24f56874",
"patch": "@@ -14,7 +14,7 @@\n \n def linear_quant(x, bits, min=-6, max=6):\n range = max - min\n- step = range / 2**bits\n+ step = range / (2**bits - 1)\n quantized = hard_round(x / step) * step\n quantized.data.clamp_(min, max)\n return quantized"
}
] |
H1rnN1 | ba44d07de3b7e7face9fc549809fe15042e96846 | 62d113fe026af7d9ff5c27dd407352b04d3a7c56 | main.py | https://github.com/michaelwiest/H1rnN1 | true | false | false | @@ -30,7 +30,7 @@ rnn = RNN(1, num_filters, len(vocab.keys()), kernel_size, lstm_hidden_units,
train_loss, val_loss = rnn.train(fs, 30, 5, 0.001,
samples_per_epoch=samples_per_epoch)
-torch.save(model.state_dict(), 'model.pt')
+torch.save(rnn.state_dict(), 'model.pt')
with open('log.csv', 'w+') as csvfile:
writer = csv.writer(csvfile, delimiter=',', quoting=csv.QUOTE_MINIMAL)
| torch . save ( model . state_dict ( ) , 'model.pt' ) | torch . save ( rnn . state_dict ( ) , 'model.pt' ) | SAME_FUNCTION_WRONG_CALLER | [["Update", ["identifier:model", 3, 12, 3, 17], "rnn"]] | michaelwiest/H1rnN1@ba44d07de3b7e7face9fc549809fe15042e96846 | stupid save error | [
{
"sha": "053e04f90130ae86aceeba92b7f05d630f209703",
"filename": "main.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/michaelwiest/H1rnN1/blob/ba44d07de3b7e7face9fc549809fe15042e96846/main.py",
"raw_url": "https://github.com/michaelwiest/H1rnN1/raw/ba44d07de3b7e7face9fc549809fe15042e96846/main.py",
"contents_url": "https://api.github.com/repos/michaelwiest/H1rnN1/contents/main.py?ref=ba44d07de3b7e7face9fc549809fe15042e96846",
"patch": "@@ -30,7 +30,7 @@\n train_loss, val_loss = rnn.train(fs, 30, 5, 0.001,\n samples_per_epoch=samples_per_epoch)\n \n-torch.save(model.state_dict(), 'model.pt')\n+torch.save(rnn.state_dict(), 'model.pt')\n \n with open('log.csv', 'w+') as csvfile:\n writer = csv.writer(csvfile, delimiter=',', quoting=csv.QUOTE_MINIMAL)"
}
] |
H1rnN1 | 3a5e0d5e42815c7492f2a8e169bb610d06755a87 | 1bd878f0e61f09ab6142411519e02c7b6a54a9f8 | RNN.py | https://github.com/michaelwiest/H1rnN1 | true | false | true | @@ -135,7 +135,7 @@ class RNN(nn.Module):
return train_loss_vec, val_loss_vec
def daydream(self, primer, T, fasta_sampler, predict_len=None):
- vocab_size = len(vocab)
+ vocab_size = len(fasta_sampler.vocabulary)
# Have we detected an end character?
end_found = False
self.batch_size = 1
| vocab_size = len ( vocab ) | vocab_size = len ( fasta_sampler . vocabulary ) | SINGLE_STMT | [["Insert", ["argument_list", 3, 25, 3, 32], ["attribute", "N0"], 1], ["Update", ["identifier:vocab", 3, 26, 3, 31], "fasta_sampler"], ["Move", "N0", ["identifier:vocab", 3, 26, 3, 31], 0], ["Insert", "N0", [".:.", "T"], 1], ["Insert", "N0", ["identifier:vocabulary", "T"], 2]] | michaelwiest/H1rnN1@3a5e0d5e42815c7492f2a8e169bb610d06755a87 | minor bug | [
{
"sha": "d9765766a250db823562c3d0f95b0819209ba1a7",
"filename": "RNN.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/michaelwiest/H1rnN1/blob/3a5e0d5e42815c7492f2a8e169bb610d06755a87/RNN.py",
"raw_url": "https://github.com/michaelwiest/H1rnN1/raw/3a5e0d5e42815c7492f2a8e169bb610d06755a87/RNN.py",
"contents_url": "https://api.github.com/repos/michaelwiest/H1rnN1/contents/RNN.py?ref=3a5e0d5e42815c7492f2a8e169bb610d06755a87",
"patch": "@@ -135,7 +135,7 @@ def train(self, fasta_sampler, batch_size, epochs, lr, samples_per_epoch=100000)\n return train_loss_vec, val_loss_vec\n \n def daydream(self, primer, T, fasta_sampler, predict_len=None):\n- vocab_size = len(vocab)\n+ vocab_size = len(fasta_sampler.vocabulary)\n # Have we detected an end character?\n end_found = False\n self.batch_size = 1"
}
] |
H1rnN1 | 20bb6afbb50118221b5a5d16216c3e7288ed0883 | 9aef2f269edef02c5a7a6eef11e688c53ec27cfc | fasta_sampler.py | https://github.com/michaelwiest/H1rnN1 | true | false | false | @@ -123,7 +123,7 @@ class FastaSampler(object):
if slice_len is not None:
targets = []
for i, sample in enumerate(output):
- index = np.random.randint(max(0, len(sample) - slice_len + 1))
+ index = np.random.randint(max(1, len(sample) - slice_len + 1))
sliced = sample[index: index + slice_len]
target = sample[index + 1: index + slice_len + 1]
if len(sliced) < slice_len:
| index = np . random . randint ( max ( 0 , len ( sample ) - slice_len + 1 ) ) | index = np . random . randint ( max ( 1 , len ( sample ) - slice_len + 1 ) ) | CHANGE_NUMERIC_LITERAL | [["Update", ["integer:0", 3, 47, 3, 48], "1"]] | michaelwiest/H1rnN1@20bb6afbb50118221b5a5d16216c3e7288ed0883 | index fix for random integer. | [
{
"sha": "8719fe0ab955f4a453d4925523541adb48118c40",
"filename": "fasta_sampler.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/michaelwiest/H1rnN1/blob/20bb6afbb50118221b5a5d16216c3e7288ed0883/fasta_sampler.py",
"raw_url": "https://github.com/michaelwiest/H1rnN1/raw/20bb6afbb50118221b5a5d16216c3e7288ed0883/fasta_sampler.py",
"contents_url": "https://api.github.com/repos/michaelwiest/H1rnN1/contents/fasta_sampler.py?ref=20bb6afbb50118221b5a5d16216c3e7288ed0883",
"patch": "@@ -123,7 +123,7 @@ def generate_N_random_samples_and_targets(self, N, group='train',\n if slice_len is not None:\n targets = []\n for i, sample in enumerate(output):\n- index = np.random.randint(max(0, len(sample) - slice_len + 1))\n+ index = np.random.randint(max(1, len(sample) - slice_len + 1))\n sliced = sample[index: index + slice_len]\n target = sample[index + 1: index + slice_len + 1]\n if len(sliced) < slice_len:"
}
] |
H1rnN1 | 3bce32848131d6f4186c86fab6dac29837cfafb0 | 70ffa6a66f0d505f4796482e62e5218054ce609e | RNN.py | https://github.com/michaelwiest/H1rnN1 | true | false | false | @@ -40,7 +40,7 @@ class RNN(nn.Module):
self.convs.append(nn.Sequential(self.c))
- self.lstm_in_size = len(self.convs) * num_filters + 1 # +1 for raw sequence
+ self.lstm_in_size = len(self.convs) * num_filters + self.input_size
self.convs = nn.ModuleList(self.convs)
self.lstm = nn.LSTM(self.lstm_in_size, lstm_hidden, n_layers, dropout=0.01)
self.out = nn.Linear(lstm_hidden, output_size)
| self . lstm_in_size = len ( self . convs ) * num_filters + 1 | self . lstm_in_size = len ( self . convs ) * num_filters + self . input_size | CHANGE_BINARY_OPERAND | [["Insert", ["binary_operator", 3, 29, 3, 62], ["attribute", "N0"], 2], ["Insert", "N0", ["identifier:self", "T"], 0], ["Insert", "N0", [".:.", "T"], 1], ["Insert", "N0", ["identifier:input_size", "T"], 2], ["Delete", ["integer:1", 3, 61, 3, 62]]] | michaelwiest/H1rnN1@3bce32848131d6f4186c86fab6dac29837cfafb0 | Fixed input size argument. | [
{
"sha": "fab8f66cecfc365c64267daec588fc27eef40384",
"filename": "RNN.py",
"status": "modified",
"additions": 2,
"deletions": 2,
"changes": 4,
"blob_url": "https://github.com/michaelwiest/H1rnN1/blob/3bce32848131d6f4186c86fab6dac29837cfafb0/RNN.py",
"raw_url": "https://github.com/michaelwiest/H1rnN1/raw/3bce32848131d6f4186c86fab6dac29837cfafb0/RNN.py",
"contents_url": "https://api.github.com/repos/michaelwiest/H1rnN1/contents/RNN.py?ref=3bce32848131d6f4186c86fab6dac29837cfafb0",
"patch": "@@ -31,7 +31,7 @@ def __init__(self, input_size, num_filters, output_size,\n \n self.bn1 = nn.BatchNorm1d(num_filters)\n self.convs = []\n- for i in xrange(0,len(kernel_size)):\n+ for i in xrange(0, len(kernel_size)):\n pad = kernel_size[i] + (kernel_size[i] - 1) * dilation[i]\n if (dilation[i] != 0):\n self.c = nn.Conv1d(input_size, num_filters, kernel_size[i], dilation=dilation[i], padding=pad)\n@@ -40,7 +40,7 @@ def __init__(self, input_size, num_filters, output_size,\n self.convs.append(nn.Sequential(self.c))\n \n \n- self.lstm_in_size = len(self.convs) * num_filters + 1 # +1 for raw sequence\n+ self.lstm_in_size = len(self.convs) * num_filters + self.input_size\n self.convs = nn.ModuleList(self.convs)\n self.lstm = nn.LSTM(self.lstm_in_size, lstm_hidden, n_layers, dropout=0.01)\n self.out = nn.Linear(lstm_hidden, output_size)"
}
] |
shell-novice-es | b4b2dcd80a16d4aeaf5db9a40b02fc513e279415 | 0a7d69c3442f843bb361e630ca0d9971c1b457b9 | tools/filters/blockquote2div.py | https://github.com/olemis/shell-novice-es | true | false | false | @@ -52,7 +52,7 @@ SPECIAL_CLASSES = {
"callout": ("panel-info", "glyphicon-pushpin"),
"challenge": ("panel-success", "glyphicon-pencil"),
"prereq": ("panel-warning", "glyphicon-education"),
- "objectives": ("panel-primary", "glyphicon-certificate"),
+ "objectives": ("panel-warning", "glyphicon-certificate"),
}
| "objectives" : ( "panel-primary" , "glyphicon-certificate" ) , | "objectives" : ( "panel-warning" , "glyphicon-certificate" ) , | CHANGE_STRING_LITERAL | [["Update", ["string:\"panel-primary\"", 3, 20, 3, 35], "\"panel-warning\""]] | olemis/shell-novice-es@b4b2dcd80a16d4aeaf5db9a40b02fc513e279415 | Fix bug at panels
From http://getbootstrap.com/components/#panels-alternatives
the only panel that the font color is white is
`panel-primary` and for that reason it is the only one that we can't use.
This replace the use of `panel-primary` with `panel-warning`
since prerequisites and learning objectives **never**
appear in the same file. | [
{
"sha": "485b77082848e76496dad30a29b5d580d3b32e2a",
"filename": "tools/filters/blockquote2div.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/olemis/shell-novice-es/blob/b4b2dcd80a16d4aeaf5db9a40b02fc513e279415/tools%2Ffilters%2Fblockquote2div.py",
"raw_url": "https://github.com/olemis/shell-novice-es/raw/b4b2dcd80a16d4aeaf5db9a40b02fc513e279415/tools%2Ffilters%2Fblockquote2div.py",
"contents_url": "https://api.github.com/repos/olemis/shell-novice-es/contents/tools%2Ffilters%2Fblockquote2div.py?ref=b4b2dcd80a16d4aeaf5db9a40b02fc513e279415",
"patch": "@@ -52,7 +52,7 @@\n \"callout\": (\"panel-info\", \"glyphicon-pushpin\"),\n \"challenge\": (\"panel-success\", \"glyphicon-pencil\"),\n \"prereq\": (\"panel-warning\", \"glyphicon-education\"),\n- \"objectives\": (\"panel-primary\", \"glyphicon-certificate\"),\n+ \"objectives\": (\"panel-warning\", \"glyphicon-certificate\"),\n }\n \n "
}
] |
shell-novice-es | 15331a0242d2f4c7d7442718414ebf9b6a014999 | 6e037a57288bce7e8f97a11fde9ac8c5bb00fbf4 | tools/catalog.py | https://github.com/olemis/shell-novice-es | true | false | false | @@ -1,6 +1,6 @@
#!/usr/bin/env python
-'''Create YAML catalog of CSS styles using in a set of HTML documents.
+'''Create YAML catalog of CSS styles used in a set of HTML documents.
Usage: catalog.py file [file...]
| using in a set of HTML documents . Usage : catalog . py file [ file . . . ] | used in a set of HTML documents . Usage : catalog . py file [ file . . . ] | CHANGE_IDENTIFIER_USED | [["Update", ["identifier:using", 2, 38, 2, 43], "used"]] | olemis/shell-novice-es@15331a0242d2f4c7d7442718414ebf9b6a014999 | Fixing typo | [
{
"sha": "cc31b1183d8caf3fa1b244d7e0a579b2f5a9187c",
"filename": "tools/catalog.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/olemis/shell-novice-es/blob/15331a0242d2f4c7d7442718414ebf9b6a014999/tools%2Fcatalog.py",
"raw_url": "https://github.com/olemis/shell-novice-es/raw/15331a0242d2f4c7d7442718414ebf9b6a014999/tools%2Fcatalog.py",
"contents_url": "https://api.github.com/repos/olemis/shell-novice-es/contents/tools%2Fcatalog.py?ref=15331a0242d2f4c7d7442718414ebf9b6a014999",
"patch": "@@ -1,6 +1,6 @@\n #!/usr/bin/env python\n \n-'''Create YAML catalog of CSS styles using in a set of HTML documents.\n+'''Create YAML catalog of CSS styles used in a set of HTML documents.\n \n Usage: catalog.py file [file...]\n '''"
}
] |
shell-novice-es | fc98097b0eb67b895f57c41208f82499cbcdb8fa | 3c28d16e4ca4a5fde52e46120d3ea408f8e57e08 | bin/util.py | https://github.com/olemis/shell-novice-es | true | false | true | @@ -51,7 +51,7 @@ class Reporter(object):
if not self.messages:
return
- for m in self.messages:
+ for m in sorted(self.messages):
print(m, file=stream)
| for m in self . messages : print ( m , file = stream ) | for m in sorted ( self . messages ) : print ( m , file = stream ) | ADD_FUNCTION_AROUND_EXPRESSION | [["Insert", ["for_statement", 3, 9, 4, 34], ["call", "N0"], 3], ["Insert", "N0", ["identifier:sorted", "T"], 0], ["Insert", "N0", ["argument_list", "N1"], 1], ["Insert", "N1", ["(:(", "T"], 0], ["Move", "N1", ["attribute", 3, 18, 3, 31], 1], ["Insert", "N1", ["):)", "T"], 2]] | olemis/shell-novice-es@fc98097b0eb67b895f57c41208f82499cbcdb8fa | Printing error messages in sorted order | [
{
"sha": "b2d66dc1757b7aa4bd3f60a2485f30dc089ebf66",
"filename": "bin/util.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/olemis/shell-novice-es/blob/fc98097b0eb67b895f57c41208f82499cbcdb8fa/bin%2Futil.py",
"raw_url": "https://github.com/olemis/shell-novice-es/raw/fc98097b0eb67b895f57c41208f82499cbcdb8fa/bin%2Futil.py",
"contents_url": "https://api.github.com/repos/olemis/shell-novice-es/contents/bin%2Futil.py?ref=fc98097b0eb67b895f57c41208f82499cbcdb8fa",
"patch": "@@ -51,7 +51,7 @@ def report(self, stream=sys.stdout):\n \n if not self.messages:\n return\n- for m in self.messages:\n+ for m in sorted(self.messages):\n print(m, file=stream)\n \n "
}
] |
shell-novice-es | 3e332fccbc5e63676dbb7642d9a42eba524f02d6 | 446d1c2f751e99ae53a3141f04b059053aebc3f9 | bin/lesson_check.py | https://github.com/olemis/shell-novice-es | true | false | true | @@ -163,7 +163,7 @@ def check_config(reporter, source_dir):
reporter.check_field(config_file, 'configuration', config, 'kind', 'lesson')
reporter.check_field(config_file, 'configuration', config, 'carpentry', ('swc', 'dc', 'lc'))
reporter.check_field(config_file, 'configuration', config, 'title')
- reporter.check_field(config_file, 'configuration', config, 'contact')
+ reporter.check_field(config_file, 'configuration', config, 'email')
reporter.check({'values': {'root': '..'}} in config.get('defaults', []),
'configuration',
| reporter . check_field ( config_file , 'configuration' , config , 'contact' ) | reporter . check_field ( config_file , 'configuration' , config , 'email' ) | CHANGE_STRING_LITERAL | [["Update", ["string:'contact'", 3, 64, 3, 73], "'email'"]] | olemis/shell-novice-es@3e332fccbc5e63676dbb7642d9a42eba524f02d6 | Fix email as keyword in bin/lesson_check.py | [
{
"sha": "28b691ba89de581530869ae06c619b555e056951",
"filename": "bin/lesson_check.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/olemis/shell-novice-es/blob/3e332fccbc5e63676dbb7642d9a42eba524f02d6/bin%2Flesson_check.py",
"raw_url": "https://github.com/olemis/shell-novice-es/raw/3e332fccbc5e63676dbb7642d9a42eba524f02d6/bin%2Flesson_check.py",
"contents_url": "https://api.github.com/repos/olemis/shell-novice-es/contents/bin%2Flesson_check.py?ref=3e332fccbc5e63676dbb7642d9a42eba524f02d6",
"patch": "@@ -163,7 +163,7 @@ def check_config(reporter, source_dir):\n reporter.check_field(config_file, 'configuration', config, 'kind', 'lesson')\n reporter.check_field(config_file, 'configuration', config, 'carpentry', ('swc', 'dc', 'lc'))\n reporter.check_field(config_file, 'configuration', config, 'title')\n- reporter.check_field(config_file, 'configuration', config, 'contact')\n+ reporter.check_field(config_file, 'configuration', config, 'email')\n \n reporter.check({'values': {'root': '..'}} in config.get('defaults', []),\n 'configuration',"
}
] |
shell-novice-es | 9259abf17b39c66f5e0912d127f5e4e5f63b8c57 | 1083d36c335bfcd04afeb1cac27aab33db0da496 | bin/workshop_check.py | https://github.com/olemis/shell-novice-es | true | false | false | @@ -21,7 +21,7 @@ URL_PATTERN = r'https?://.+'
CARPENTRIES = ("dc", "swc")
DEFAULT_CONTACT_EMAIL = '[email protected]'
-USAGE = 'Usage: "check-workshop path/to/root/directory"'
+USAGE = 'Usage: "workshop_check.py path/to/root/directory"'
# Country and language codes. Note that codes mean different things: 'ar'
# is 'Arabic' as a language but 'Argentina' as a country.
| USAGE = 'Usage: "check-workshop path/to/root/directory"' | USAGE = 'Usage: "workshop_check.py path/to/root/directory"' | CHANGE_STRING_LITERAL | [["Update", ["string:'Usage: \"check-workshop path/to/root/directory\"'", 3, 9, 3, 57], "'Usage: \"workshop_check.py path/to/root/directory\"'"]] | olemis/shell-novice-es@9259abf17b39c66f5e0912d127f5e4e5f63b8c57 | Fix usage instruction at bin/workshop_check.py
Close #152. | [
{
"sha": "cd3a8bfc822efd8a432ccebd6f8bd73a2307ff61",
"filename": "bin/workshop_check.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/olemis/shell-novice-es/blob/9259abf17b39c66f5e0912d127f5e4e5f63b8c57/bin%2Fworkshop_check.py",
"raw_url": "https://github.com/olemis/shell-novice-es/raw/9259abf17b39c66f5e0912d127f5e4e5f63b8c57/bin%2Fworkshop_check.py",
"contents_url": "https://api.github.com/repos/olemis/shell-novice-es/contents/bin%2Fworkshop_check.py?ref=9259abf17b39c66f5e0912d127f5e4e5f63b8c57",
"patch": "@@ -21,7 +21,7 @@\n CARPENTRIES = (\"dc\", \"swc\")\n DEFAULT_CONTACT_EMAIL = '[email protected]'\n \n-USAGE = 'Usage: \"check-workshop path/to/root/directory\"'\n+USAGE = 'Usage: \"workshop_check.py path/to/root/directory\"'\n \n # Country and language codes. Note that codes mean different things: 'ar'\n # is 'Arabic' as a language but 'Argentina' as a country."
}
] |
matplotlib | 4cc759d2e91c8574bcb984d4c760683a7a99e080 | 424c79db3d359b8f4ee24c4f2d3593328cf76ade | lib/matplotlib/backends/backend_pdf.py | https://github.com/dsquareindia/matplotlib | true | false | true | @@ -112,7 +112,7 @@ def pdfRepr(obj):
# need to use %f with some precision. Perhaps the precision
# should adapt to the magnitude of the number?
elif isinstance(obj, float):
- if npy.isnan(obj) or obj in (-npy.infinity, npy.infinity):
+ if npy.isnan(obj) or obj in (-npy.inf, npy.inf):
raise ValueError, "Can only output finite numbers in PDF"
r = "%.10f" % obj
return r.rstrip('0').rstrip('.')
| if npy . isnan ( obj ) or obj in ( - npy . infinity , npy . infinity ) : raise ValueError , "Can only output finite numbers in PDF" | if npy . isnan ( obj ) or obj in ( - npy . inf , npy . inf ) : raise ValueError , "Can only output finite numbers in PDF" | SINGLE_STMT | [["Update", ["identifier:infinity", 3, 57, 3, 65], "inf"], ["Update", ["identifier:infinity", 3, 43, 3, 51], "inf"]] | dsquareindia/matplotlib@4cc759d2e91c8574bcb984d4c760683a7a99e080 | null | null |
matplotlib | 7bda43d04cf925e669ac1103f1cec2e148fd33d9 | a34268aad11231cffbfbbd5c8f2ee153a2604d0d | lib/matplotlib/backends/backend_cairo.py | https://github.com/dsquareindia/matplotlib | true | false | true | @@ -335,7 +335,7 @@ class RendererCairo(RendererBase):
Xall[:,i] = npy.fromstring(s, npy.uint8)
# get the max alpha at each pixel
- Xs = npy.mlab.max (Xall,1)
+ Xs = npy.max (Xall,1)
# convert it to it's proper shape
Xs.shape = imh, imw
| Xs = npy . mlab . max ( Xall , 1 ) | Xs = npy . max ( Xall , 1 ) | SINGLE_STMT | [["Delete", ["identifier:mlab", 3, 18, 3, 22]], ["Delete", [".:.", 3, 22, 3, 23]]] | dsquareindia/matplotlib@7bda43d04cf925e669ac1103f1cec2e148fd33d9 | null | null |
End of preview. Expand
in Dataset Viewer.
extent the TSSB-3M
dataset with more commit info(commit message、source code files...)
sample
{
"project": "ngraph",
"commit_sha": "1445e0684fbcca2ec49a5f1becf1345159b7ba6a",
"parent_sha": "4eb8eed57e506e8a2745b298340666e9d7e5ce58",
"file_path": "ngraph/op_graph/op_graph.py",
"project_url": "https://github.com/rsumner31/ngraph",
"likely_bug": true,
"comodified": false,
"in_function": true,
"diff": "@@ -787,7 +787,7 @@ def set_item(tensor, item, value):\n sl = slice(sl)\n start, end, step = sl.indices(l)\n if step <= 0:\n- raise ValueError('Invalid slice in item {}'.format(item))\n+ raise ValueError('Invalid slice (negative step) in item {}'.format(item))\n return assign(tensor_slice(tensor, item, axes=value.axes), value)\n \n \n",
"before": "raise ValueError ( 'Invalid slice in item {}' . format ( item ) )",
"after": "raise ValueError ( 'Invalid slice (negative step) in item {}' . format ( item ) )",
"sstub_pattern": "CHANGE_STRING_LITERAL",
"edit_script": "[[\"Update\", [\"string:'Invalid slice in item {}'\", 3, 30, 3, 56], \"'Invalid slice (negative step) in item {}'\"]]",
"key": "rsumner31/ngraph@1445e0684fbcca2ec49a5f1becf1345159b7ba6a",
"commit_message": "Better error description.",
"files": [
{
"sha": "52e76a0a5acb043db75592be1bdd09fc6fedf932",
"filename": "ngraph/op_graph/op_graph.py",
"status": "modified",
"additions": 1,
"deletions": 1,
"changes": 2,
"blob_url": "https://github.com/rsumner31/ngraph/blob/1445e0684fbcca2ec49a5f1becf1345159b7ba6a/ngraph%2Fop_graph%2Fop_graph.py",
"raw_url": "https://github.com/rsumner31/ngraph/raw/1445e0684fbcca2ec49a5f1becf1345159b7ba6a/ngraph%2Fop_graph%2Fop_graph.py",
"contents_url": "https://api.github.com/repos/rsumner31/ngraph/contents/ngraph%2Fop_graph%2Fop_graph.py?ref=1445e0684fbcca2ec49a5f1becf1345159b7ba6a",
"patch": "@@ -787,7 +787,7 @@ def set_item(tensor, item, value):\n sl = slice(sl)\n start, end, step = sl.indices(l)\n if step <= 0:\n- raise ValueError('Invalid slice in item {}'.format(item))\n+ raise ValueError('Invalid slice (negative step) in item {}'.format(item))\n return assign(tensor_slice(tensor, item, axes=value.axes), value)\n \n "
}
],
"find_commit": 1
}
Reference
- [1]. Richter, Cedric, and Heike Wehrheim. "TSSB-3M: Mining single statement bugs at massive scale." Proceedings of the 19th International Conference on Mining Software Repositories. 2022
- Downloads last month
- 68