PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: vaskoz/dailycodingproblem-go (go)

Issue:
Day 123
Good morning! Here's your coding interview problem for today.

This problem was asked by LinkedIn.

Given a string, return whether it represents a number. Here are the different kinds of numbers:

"10", a positive integer
"-10", a negative integer
"10.1", a positive real number
"-10.1", a negative real number
"1e5", a number in scientific notation
And here are examples of non-numbers:

"a"
"x 1"
"a -2"
"-"

Pull request:
Day123
Resolves #253.

Patch:
diff --git a/README.md b/README.md
index b2c7ff2..3f1fc11 100644
--- a/README.md
+++ b/README.md
@@ -128,3 +128,4 @@ problems from
 * [Day 116](https://github.com/vaskoz/dailycodingproblem-go/issues/242)
 * [Day 118](https://github.com/vaskoz/dailycodingproblem-go/issues/246)
 * [Day 120](https://github.com/vaskoz/dailycodingproblem-go/issues/248)
+* [Day 123](https://github.com/vaskoz/dailycodingproblem-go/issues/253)
diff --git a/day123/problem.go b/day123/problem.go
new file mode 100644
index 0000000..ab70c2c
--- /dev/null
+++ b/day123/problem.go
@@ -0,0 +1,30 @@
+package day123
+
+// IsANumber answers if the given string
+// can be converted to a number.
+func IsANumber(str string) bool {
+	var seenNeg, seenDecimal, seenE, seenDigit bool
+	for _, r := range str {
+		if r == '-' {
+			if seenNeg || seenDigit {
+				return false
+			}
+			seenNeg = true
+		} else if r == '.' {
+			if seenDecimal || !seenDigit {
+				return false
+			}
+			seenDecimal = true
+		} else if r == 'e' || r == 'E' {
+			if seenE || !seenDigit {
+				return false
+			}
+			seenE = true
+		} else if r >= '0' && r <= '9' {
+			seenDigit = true
+		} else {
+			return false
+		}
+	}
+	return seenDigit
+}


Test patch:
diff --git a/day123/problem_test.go b/day123/problem_test.go
new file mode 100644
index 0000000..506c2cf
--- /dev/null
+++ b/day123/problem_test.go
@@ -0,0 +1,40 @@
+package day123
+
+import "testing"
+
+var testcases = []struct {
+	input    string
+	isNumber bool
+}{
+	{"10", true},
+	{"-10", true},
+	{"10.1", true},
+	{"-10.1", true},
+	{"1e5", true},
+	{"a", false},
+	{"x 1", false},
+	{"a -2", false},
+	{"-", false},
+	{"1-2", false},
+	{".12", false},
+	{"0.12", true},
+	{"1eE2", false},
+	{"1E2", true},
+}
+
+func TestIsANumber(t *testing.T) {
+	t.Parallel()
+	for _, tc := range testcases {
+		if result := IsANumber(tc.input); result != tc.isNumber {
+			t.Errorf("For input %v expected %v got %v", tc.input, tc.isNumber, result)
+		}
+	}
+}
+
+func BenchmarkIsANumber(b *testing.B) {
+	for i := 0; i < b.N; i++ {
+		for _, tc := range testcases {
+			IsANumber(tc.input)
+		}
+	}
+}
Repository: jazzband/tablib (python)

Issue:
Row.lpush/rpush behavior is reversed
As discovered while testing #450, `Row.lpush` is appending, while `Row.rpush` is prepending, which is counter-intuitive (and doesn't match the `Dataset.lpush/rpush`behavior).

Pull request:
Fixes #453 - Reversing behavior of Row.lpush/Row.rpush
Co-authored-by: chim <chenpan@xiaomai5.com>

Patch:
diff --git a/HISTORY.md b/HISTORY.md
index 21647dc..c6c6c72 100644
--- a/HISTORY.md
+++ b/HISTORY.md
@@ -1,5 +1,13 @@
 # History
 
+## 2.0.0 (Unreleased)
+
+### Breaking changes
+
+- The `Row.lpush/rpush` logic was reversed. `lpush` was appending while `rpush`
+  and `append` were prepending. This was fixed (reversed behavior). If you
+  counted on the broken behavior, please update your code (#453).
+
 ## 1.1.0 (2020-02-13)
 
 ### Deprecations
diff --git a/src/tablib/core.py b/src/tablib/core.py
index 73cc8e6..4fbe76a 100644
--- a/src/tablib/core.py
+++ b/src/tablib/core.py
@@ -71,10 +71,10 @@ class Row:
             setattr(self, k, v)
 
     def rpush(self, value):
-        self.insert(0, value)
+        self.insert(len(self._row), value)
 
     def lpush(self, value):
-        self.insert(len(value), value)
+        self.insert(0, value)
 
     def append(self, value):
         self.rpush(value)


Test patch:
diff --git a/tests/test_tablib.py b/tests/test_tablib.py
index 3acdd44..3d71da5 100755
--- a/tests/test_tablib.py
+++ b/tests/test_tablib.py
@@ -556,27 +556,15 @@ class TablibTestCase(BaseTestCase):
 
     def test_row_lpush(self):
         """Row lpush."""
-        # Arrange
         john = Row(self.john)
-        george = Row(self.george)
-
-        # Act
-        john.lpush(george)
-
-        # Assert
-        self.assertEqual(john[-1], george)
+        john.lpush(53)
+        self.assertEqual(john.list, [53, 'John', 'Adams', 90])
 
     def test_row_append(self):
         """Row append."""
-        # Arrange
         john = Row(self.john)
-        george = Row(self.george)
-
-        # Act
-        john.append(george)
-
-        # Assert
-        self.assertEqual(john[0], george)
+        john.append('stuff')
+        self.assertEqual(john.list, ['John', 'Adams', 90, 'stuff'])
 
     def test_row_contains(self):
         """Row __contains__."""
Repository: busyorg/busy (js)

Issue:
Issue of last 12 hours post period
#### Expected behavior

An error "Error : You can't vote on last 12 hours of a post" should appear. When we upvote a post within its last 12 hours

#### Actual behavior

An error with no explanations is shown When we upvote a post within its last 12 hours

#### How to reproduce

Just try to upvote a post within its last 12 hours




Pull request:
fix: add UPVOTE_LOCKOUT error fingerprint
Fixes #2038 

### Changes

* add UPVOTE_LOCKOUT error fingerprint

### Test plan

It would require to find a post almost 7 days old and to make an upvote that will manage to change rshares of the post. I failed to find such post - added test should suffice though.

Patch:
diff --git a/src/common/constants/errors.js b/src/common/constants/errors.js
index 989e02cb..fc1dc5cb 100644
--- a/src/common/constants/errors.js
+++ b/src/common/constants/errors.js
@@ -27,4 +27,8 @@ export default {
     fingerprint: 'abs_rshares > STEEM_VOTE_DUST_THRESHOLD',
     message: 'Your voting power is too small, please accumulate more voting power or steem power.',
   },
+  UPVOTE_LOCKOUT: {
+    fingerprint: 'Cannot increase payout within last twelve hours before payout.',
+    message: "You can't increase payout within last twelve hours before payout.",
+  },
 };


Test patch:
diff --git a/src/client/helpers/__tests__/errorMiddleware.js b/src/client/helpers/__tests__/errorMiddleware.js
index 5f43e975..9921d9cc 100644
--- a/src/client/helpers/__tests__/errorMiddleware.js
+++ b/src/client/helpers/__tests__/errorMiddleware.js
@@ -44,6 +44,10 @@ describe('parseBlockChainError', () => {
     expected =
       'Your voting power is too small, please accumulate more voting power or steem power.';
     expect(actual).toEqual(expected);
+
+    actual = parseBlockChainError('Cannot increase payout within last twelve hours before payout.');
+    expected = "You can't increase payout within last twelve hours before payout.";
+    expect(actual).toEqual(expected);
   });
 
   it('should extract message from unknown error', () => {
Repository: depcheck/depcheck (js)

Issue:
Short name for Jest `testEnvironment` doesn't seem to be recognised
### Bug Description

Jest special supports short names for runners and watch plugins, but not for the test environment https://github.com/depcheck/depcheck/blob/77fe0e2d092bdc8b97b65e37955f59be8a436d19/src/special/jest.js#L69-L75

### Code snippets

Where the dependency is used:

```
// jest.config.js
testEnvironment: 'jsdom',
```

Where the dependency is listed in package.json:

```
// devDependencies
"jest-environment-jsdom": "^29.6.3",
```

### Versions

- `node -v`: 18.17.0
- `npm -v`: 9.6.7
- `depcheck --version`: 1.4.7

### Extra info

Any extra info you want to include. Thank you for the bug report!

BONUS POINTS: If you wish to help us debug further, the `depcheck --json` option will show more information. Check [here in the README](https://github.com/depcheck/depcheck#example) for documentation on json output.


Pull request:
fix: support short name for Jest test environments
Fix #857

Patch:
diff --git a/src/special/jest.js b/src/special/jest.js
index 3363f0c..0f732d6 100644
--- a/src/special/jest.js
+++ b/src/special/jest.js
@@ -74,6 +74,10 @@ function filter(deps, options) {
     contain(options.watchPlugins, dep, 'jest-watch-'),
   );
 
+  const testEnvironment = deps.filter((dep) =>
+    contain(options.testEnvironment, dep, 'jest-environment-'),
+  );
+
   const otherProps = lodash(options)
     .entries()
     .map(([prop, value]) => {
@@ -89,7 +93,9 @@ function filter(deps, options) {
     .intersection(deps)
     .value();
 
-  return _.uniq(runner.concat(watchPlugins).concat(otherProps));
+  return _.uniq(
+    runner.concat(watchPlugins).concat(testEnvironment).concat(otherProps),
+  );
 }
 
 function checkOptions(deps, options = {}) {


Test patch:
diff --git a/test/special/jest.js b/test/special/jest.js
index 6ed11e2..0e397f1 100644
--- a/test/special/jest.js
+++ b/test/special/jest.js
@@ -52,6 +52,16 @@ const testCases = [
     deps: ['jest-watch-master', 'jest-watch-select-projects'],
     content: { watchPlugins: ['master', 'select-projects'] },
   },
+  {
+    name: 'recognize single short-name test environment',
+    deps: ['jest-environment-jsdom'],
+    content: { testEnvironment: 'jsdom' },
+  },
+  {
+    name: 'recognize single long-name test environment',
+    deps: ['jest-environment-jsdom'],
+    content: { testEnvironment: 'jest-environment-jsdom' },
+  },
   {
     name: 'recognize module with options',
     deps: ['jest-watch-master'],