nebius/SWE-bench-extra huggingface dataset:
Repository: deepchem/deepchem

Issue:
Bug in dataset.get_shape() when used after dataset.set_shard()
## 🐛 Bug

## To Reproduce

<!-- If you have a code sample, error messages, stack traces, please provide it here as well. -->

## Expected behavior

```
import deepchem as dc
import numpy as np
X = np.random.randn(10, 3)
y = np.random.randn(10)

dataset = dc.data.DiskDataset.from_numpy(X, y)
dataset.get_shape()  # Output: ((10, 3), (10,), (10,), (10,))

for i, (X, y, w, ids) in enumerate(dataset.itershards()):
    X = X[1:]
    y = y[1:]
    w = w[1:]
    ids = ids[1:]
    dataset.set_shard(i, X, y, w, ids)

dataset.get_shape()  
# Output: ((10, 3), (10,), (10,), (10,))
# Expected output: ((9, 3), (9, ), (9, ), (9,))
```

Edit 1:

This prints correctly:
```
for i, (X, y, w, ids) in enumerate(dataset.itershards()):
    print (X.shape)  # Output: (9, 3)
```
## Environment
* DeepChem version: 2.6.0.dev

## Additional context
The fix is probably a simple one.


Comments:

Patch:
diff --git a/deepchem/data/datasets.py b/deepchem/data/datasets.py
index f80a399ca..dd5ba637f 100644
--- a/deepchem/data/datasets.py
+++ b/deepchem/data/datasets.py
@@ -2286,6 +2286,7 @@ class DiskDataset(Dataset):
     basename = "shard-%d" % shard_num
     DiskDataset.write_data_to_disk(self.data_dir, basename, X, y, w, ids)
     self._cached_shards = None
+    self.legacy_metadata = True
 
   def select(self,
              indices: Sequence[int],


Test patch:
diff --git a/deepchem/data/tests/test_setshard.py b/deepchem/data/tests/test_setshard.py
new file mode 100644
index 000000000..0fcf4b03e
--- /dev/null
+++ b/deepchem/data/tests/test_setshard.py
@@ -0,0 +1,21 @@
+import deepchem as dc
+import numpy as np
+
+
+def test_setshard_with_X_y():
+  """Test setsharding on a simple example"""
+  X = np.random.rand(10, 3)
+  y = np.random.rand(10,)
+  dataset = dc.data.DiskDataset.from_numpy(X, y)
+  X_shape, y_shape, _, _ = dataset.get_shape()
+  assert X_shape[0] == 10
+  assert y_shape[0] == 10
+  for i, (X, y, w, ids) in enumerate(dataset.itershards()):
+    X = X[1:]
+    y = y[1:]
+    w = w[1:]
+    ids = ids[1:]
+    dataset.set_shard(i, X, y, w, ids)
+  X_shape, y_shape, _, _ = dataset.get_shape()
+  assert X_shape[0] == 9
+  assert y_shape[0] == 9
Repository: deppen8/pandas-vet

Issue:
inplace set to a variable raises exception
**Describe the bug**
raised exception

**To Reproduce**
Steps to reproduce the behavior:

Have the following code in a file

```python
def some_function(dataFrame, in_place=False):
    return dataFrame.drop([], inplace=in_place)
```

**Expected behavior**
Allow `flake8` to report violations and not throw exceptions.

**Screenshots**
<img width="732" alt="Screen Shot 2021-09-11 at 11 42 54 AM" src="https://user-images.githubusercontent.com/82820859/132955083-596471df-a18d-4b6d-b45b-afbdaae3596d.png">

**Additional context**

```
bash-5.1# cat /usr/lib/python3.9/site-packages/pandas_vet/version.py 
__version__ = "0.2.2"
```

This is running on a docker container based on alpine:3.14.1. Same results obtained on a mac.

Things work if we do not provide a variable:

```python
def some_function(dataFrame, in_place=False):
    return dataFrame.drop([], inplace=False)
```



Comments:

Patch:
diff --git a/src/pandas_vet/__init__.py b/src/pandas_vet/__init__.py
index 9060511..2a4f0e0 100644
--- a/src/pandas_vet/__init__.py
+++ b/src/pandas_vet/__init__.py
@@ -173,7 +173,11 @@ def check_inplace_false(node: ast.Call) -> List:
     """
     errors = []
     for kw in node.keywords:
-        if kw.arg == "inplace" and kw.value.value is True:
+        if (
+            kw.arg == "inplace"
+            and hasattr(kw.value, "value")
+            and kw.value.value is True
+        ):
             errors.append(PD002(node.lineno, node.col_offset))
     return errors
 


Test patch:
diff --git a/tests/test_PD002.py b/tests/test_PD002.py
index 7034674..f34fb1b 100644
--- a/tests/test_PD002.py
+++ b/tests/test_PD002.py
@@ -24,3 +24,16 @@ def test_PD002_fail():
     actual = list(VetPlugin(tree).run())
     expected = [PD002(1, 0)]
     assert actual == expected
+
+
+def test_PD002_with_variable_does_not_crash():
+    """
+    Test that using inplace=<some variable> does not raise Exceptions.
+
+    It will not be able to infer the value of the variable, so no errors either.
+    """
+    statement = """use_inplace=True; df.drop(['a'], axis=1, inplace=use_inplace)"""
+    tree = ast.parse(statement)
+    actual = list(VetPlugin(tree).run())
+    expected = []
+    assert actual == expected
Repository: devsnd/tinytag

Issue:
Fail to read track_total, but it is ok in foobar
I got some tracks from qobuz.
I have some problems in reading the track_total. It showed 'null' in track_total. The others is OK, such as artist, album etc....
But its track_total seems OK, when checked in foobar.
Why?
The attachment are an example flac file
[19. I m Not The Man You Think I Am.zip](https://github.com/devsnd/tinytag/files/10875229/19.I.m.Not.The.Man.You.Think.I.Am.zip)


Comments:

Patch:
diff --git a/tinytag/tinytag.py b/tinytag/tinytag.py
index a7a8a21..8ba376d 100644
--- a/tinytag/tinytag.py
+++ b/tinytag/tinytag.py
@@ -924,8 +924,10 @@ class Ogg(TinyTag):
             'artist': 'artist',
             'date': 'year',
             'tracknumber': 'track',
+            'tracktotal': 'track_total',
             'totaltracks': 'track_total',
             'discnumber': 'disc',
+            'disctotal': 'disc_total',
             'totaldiscs': 'disc_total',
             'genre': 'genre',
             'description': 'comment',


Test patch:
diff --git a/tinytag/tests/test_all.py b/tinytag/tests/test_all.py
index 8f4421c..0b70517 100644
--- a/tinytag/tests/test_all.py
+++ b/tinytag/tests/test_all.py
@@ -230,7 +230,7 @@ testfiles = OrderedDict([
          'track': '1', 'disc': '1', 'title': 'Bad Apple!!', 'duration': 2.0, 'year': '2008.05.25',
          'filesize': 10000, 'artist': 'nomico',
          'album': 'Exserens - A selection of Alstroemeria Records',
-         'comment': 'ARCD0018 - Lovelight'}),
+         'comment': 'ARCD0018 - Lovelight', 'disc_total': '1', 'track_total': '13'}),
     ('samples/8khz_5s.opus',
         {'extra': {}, 'filesize': 7251, 'channels': 1, 'samplerate': 48000, 'duration': 5.0}),
Repository: dgilland/pydash

Issue:
merge_with: iteratee is lost when _merge_with is recursing.

```python
def merge_array(obj_val, src_val):
if isinstance(obj_val, list) and isinstance(src_val, list):
  return difference(obj_val + src_val)

merge_with({ 'd': { 'x': [2] } }, { 'd': { 'x': [5] } }, merge_array)
```

### expect

```
{ 'd': { 'x': [2, 5] } }
```

### actual

```
{ 'd': { 'x': [5] } }
```




Comments:

Patch:
diff --git a/AUTHORS.rst b/AUTHORS.rst
index a1843ad..d167ec9 100644
--- a/AUTHORS.rst
+++ b/AUTHORS.rst
@@ -24,3 +24,4 @@ Contributors
 - Gonzalo Naveira, `gonzalonaveira@github <https://github.com/gonzalonaveira>`_
 - Wenbo Zhao, zhaowb@gmail.com, `zhaowb@github <https://github.com/zhaowb>`_
 - Mervyn Lee, `mervynlee94@github <https://github.com/mervynlee94>`_
+- Weineel Lee, `weineel@github <https://github.com/weineel>`_
diff --git a/src/pydash/objects.py b/src/pydash/objects.py
index f3bed2b..6949e8e 100644
--- a/src/pydash/objects.py
+++ b/src/pydash/objects.py
@@ -934,7 +934,7 @@ def _merge_with(obj, *sources, **kwargs):
             if _result is not None:
                 result = _result
             elif all_sequences or all_mappings:
-                result = _merge_with(obj_value, src_value, _setter=setter)
+                result = _merge_with(obj_value, src_value, iteratee=iteratee, _setter=setter)
             else:
                 result = src_value
 


Test patch:
diff --git a/tests/test_objects.py b/tests/test_objects.py
index 2217438..b218043 100644
--- a/tests/test_objects.py
+++ b/tests/test_objects.py
@@ -573,11 +573,11 @@ def test_merge_no_link_list():
     [
         (
             (
-                {"fruits": ["apple"], "vegetables": ["beet"]},
-                {"fruits": ["banana"], "vegetables": ["carrot"]},
-                lambda a, b: a + b if isinstance(a, list) else b,
+                {"fruits": ["apple"], "others": {"vegetables": ["beet"]}},
+                {"fruits": ["banana"], "others": {"vegetables": ["carrot"]}},
+                lambda a, b: a + b if isinstance(a, list) else None,
             ),
-            {"fruits": ["apple", "banana"], "vegetables": ["beet", "carrot"]},
+            {"fruits": ["apple", "banana"], "others": {"vegetables": ["beet", "carrot"]}},
         ),
     ],
 )