PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: neet/masto.js (ts)

Issue:
Incomplete mastodon 3.0 support : use removed dissmiss notification endpoint
`POST /api/v1/notifications/dismiss?id=:id` is deprecated since 2.6 and removed since 3.0 (see https://github.com/tootsuite/mastodon/pull/11214)

I didn't make a PR because I don't know if you want your lib to be compatible with mastodon before 2.6.

Pull request:
Fix URL of dismissNotification
Resolves #169 

This PR also fixes a typo "dissmiss" to "dismiss"

Patch:
diff --git a/src/clients/masto/masto.ts b/src/clients/masto/masto.ts
index 9fcac4e9..c3b33683 100644
--- a/src/clients/masto/masto.ts
+++ b/src/clients/masto/masto.ts
@@ -863,11 +863,9 @@ export class Masto extends Gateway {
    * @return Returns an empty object.
    * @see https://docs.joinmastodon.org/api/rest/notifications/#post-api-v1-notifications-dismiss
    */
-  @available({ since: '0.0.0' })
-  dissmissNotification(id: string) {
-    return this.post<void>('/api/v1/notifications/dismiss', {
-      id,
-    });
+  @available({ since: '2.6.0' })
+  dismissNotification(id: string) {
+    return this.post<void>(`/api/v1/notifications/${id}/dismiss`);
   }
 
   /**


Test patch:
diff --git a/src/clients/masto/__tests__/__snapshots__/masto.spec.ts.snap b/src/clients/masto/__tests__/__snapshots__/masto.spec.ts.snap
index ac69c3f5..a22a165f 100644
--- a/src/clients/masto/__tests__/__snapshots__/masto.spec.ts.snap
+++ b/src/clients/masto/__tests__/__snapshots__/masto.spec.ts.snap
@@ -338,14 +338,11 @@ exports[`Masto createStatus with media ids 1`] = `
 }
 `;
 
-exports[`Masto dissmissNotification 1`] = `
+exports[`Masto dismissNotification 1`] = `
 [MockFunction] {
   "calls": Array [
     Array [
-      "/api/v1/notifications/dismiss",
-      Object {
-        "id": "123123",
-      },
+      "/api/v1/notifications/123123/dismiss",
     ],
   ],
   "results": Array [
diff --git a/src/clients/masto/__tests__/masto.spec.ts b/src/clients/masto/__tests__/masto.spec.ts
index a9ae3e52..e3f0a901 100644
--- a/src/clients/masto/__tests__/masto.spec.ts
+++ b/src/clients/masto/__tests__/masto.spec.ts
@@ -568,8 +568,8 @@ describe('Masto', () => {
     expect(mockPost).toMatchSnapshot();
   });
 
-  test('dissmissNotification', async () => {
-    await masto.dissmissNotification('123123');
+  test('dismissNotification', async () => {
+    await masto.dismissNotification('123123');
     expect(mockPost).toBeCalledTimes(1);
     expect(mockPost).toMatchSnapshot();
   });
Repository: vaskoz/dailycodingproblem-go (go)

Issue:
Day 156
Good morning! Here's your coding interview problem for today.

This problem was asked by Facebook.

Given a positive integer n, find the smallest number of squared integers which sum to n.

For example, given `n = 13`, return `2` since `13 = 32 + 22 = 9 + 4`.

Given `n = 27`, return `3` since `27 = 32 + 32 + 32 = 9 + 9 + 9`.

Pull request:
Day156
Resolves #325.

Patch:
diff --git a/README.md b/README.md
index 7ca9728..b544125 100644
--- a/README.md
+++ b/README.md
@@ -166,3 +166,4 @@ problems from
 * [Day 153](https://github.com/vaskoz/dailycodingproblem-go/issues/316)
 * [Day 154](https://github.com/vaskoz/dailycodingproblem-go/issues/320)
 * [Day 155](https://github.com/vaskoz/dailycodingproblem-go/issues/322)
+* [Day 156](https://github.com/vaskoz/dailycodingproblem-go/issues/325)
diff --git a/day156/problem.go b/day156/problem.go
new file mode 100644
index 0000000..23d2e1e
--- /dev/null
+++ b/day156/problem.go
@@ -0,0 +1,44 @@
+package day156
+
+import (
+	"math"
+)
+
+// MinSquared returns the smallest number
+// of squared integers which sum to n.
+// Runs in exponential time.
+func MinSquared(n int) int {
+	return minSquared(n, 0, n)
+}
+
+func minSquared(n, level, minSoFar int) int {
+	if n <= 3 {
+		return n
+	}
+	end := int(math.Sqrt(float64(n))) + 1
+	for i := end; i > 0; i-- {
+		if x := i * i; x <= n {
+			if y := 1 + minSquared(n-x, level+1, minSoFar); y < minSoFar {
+				minSoFar = y
+			}
+		}
+	}
+	return minSoFar
+}
+
+// MinSquaredDP returns the smallest number
+// of squared integers which sum to n.
+// Runs in O(N^2) time and O(N) space.
+func MinSquaredDP(n int) int {
+	table := make([]int, 0, n+1)
+	table = append(table, 0, 1, 2, 3)
+	for i := 4; i <= n+1; i++ {
+		table = append(table, i)
+		for x := 1; x < i+1; x++ {
+			if v := x * x; v <= i && table[i-v]+1 < table[i] {
+				table[i] = table[i-v] + 1
+			}
+		}
+	}
+	return table[n]
+}


Test patch:
diff --git a/day156/problem_test.go b/day156/problem_test.go
new file mode 100644
index 0000000..43cdeaa
--- /dev/null
+++ b/day156/problem_test.go
@@ -0,0 +1,44 @@
+package day156
+
+import "testing"
+
+var testcases = []struct {
+	n, expected int
+}{
+	{13, 2},
+	{27, 3},
+}
+
+func TestMinSquared(t *testing.T) {
+	t.Parallel()
+	for _, tc := range testcases {
+		if result := MinSquared(tc.n); result != tc.expected {
+			t.Errorf("For N=%d Expected %v got %v", tc.n, tc.expected, result)
+		}
+	}
+}
+
+func BenchmarkMinSquared(b *testing.B) {
+	for i := 0; i < b.N; i++ {
+		for _, tc := range testcases {
+			MinSquared(tc.n)
+		}
+	}
+}
+
+func TestMinSquaredDP(t *testing.T) {
+	t.Parallel()
+	for _, tc := range testcases {
+		if result := MinSquaredDP(tc.n); result != tc.expected {
+			t.Errorf("For N=%d Expected %v got %v", tc.n, tc.expected, result)
+		}
+	}
+}
+
+func BenchmarkMinSquaredDP(b *testing.B) {
+	for i := 0; i < b.N; i++ {
+		for _, tc := range testcases {
+			MinSquaredDP(tc.n)
+		}
+	}
+}