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

Issue:
Day 390
Good morning! Here's your coding interview problem for today.

This problem was asked by Two Sigma.

You are given an unsorted list of 999,000 unique integers, each from 1 and 1,000,000. Find the missing 1000 numbers. What is the computational and space complexity of your solution?

Pull request:
Day390
Resolves #783.

Patch:
diff --git a/README.md b/README.md
index d5a0b0b..4909e5f 100644
--- a/README.md
+++ b/README.md
@@ -382,4 +382,5 @@ problems from
 * [Day 384](https://github.com/vaskoz/dailycodingproblem-go/issues/776)
 * [Day 385](https://github.com/vaskoz/dailycodingproblem-go/issues/774)
 * [Day 386](https://github.com/vaskoz/dailycodingproblem-go/issues/778)
+* [Day 390](https://github.com/vaskoz/dailycodingproblem-go/issues/783)
 
diff --git a/day390/problem.go b/day390/problem.go
new file mode 100644
index 0000000..56ce768
--- /dev/null
+++ b/day390/problem.go
@@ -0,0 +1,22 @@
+package day390
+
+// MissingThousandInMillion returns the numbers missing
+// between 1 and 1 million.
+// Runs in O(N) time and space.
+func MissingThousandInMillion(nums []int) []int {
+	seen := make(map[int]struct{}, len(nums))
+
+	for _, n := range nums {
+		seen[n] = struct{}{}
+	}
+
+	ans := make([]int, 0, 1_000_000-len(seen)+1)
+
+	for n := 1; n <= 1_000_000; n++ {
+		if _, ok := seen[n]; !ok {
+			ans = append(ans, n)
+		}
+	}
+
+	return ans
+}


Test patch:
diff --git a/day390/problem_test.go b/day390/problem_test.go
new file mode 100644
index 0000000..d133828
--- /dev/null
+++ b/day390/problem_test.go
@@ -0,0 +1,53 @@
+package day390
+
+import (
+	"math/rand"
+	"reflect"
+	"testing"
+	"time"
+)
+
+func TestMissingThousandInMillion(t *testing.T) {
+	t.Parallel()
+
+	missing := []int{10_395, 25_011, 345_335, 565_332, 999_993}
+	input := setup(missing)
+
+	if res := MissingThousandInMillion(input); !reflect.DeepEqual(res, missing) {
+		t.Errorf("Expected %v, got %v", missing, res)
+	}
+}
+
+func BenchmarkMissingThousandInMillion(b *testing.B) {
+	missing := []int{25_011, 345_335, 565_332, 999_993, 10_395}
+	input := setup(missing)
+
+	for i := 0; i < b.N; i++ {
+		MissingThousandInMillion(input)
+	}
+}
+
+func setup(miss []int) []int {
+	r := rand.New(rand.NewSource(time.Now().UnixNano()))
+	ans := make([]int, 1_000_000-len(miss)+1)
+	missMap := make(map[int]struct{}, len(miss))
+
+	for _, n := range miss {
+		missMap[n] = struct{}{}
+	}
+
+	pos := 0
+
+	for n := 1; n <= 1_000_000; n++ {
+		if _, skip := missMap[n]; !skip {
+			ans[pos] = n
+			pos++
+		}
+	}
+
+	r.Shuffle(len(ans), func(i, j int) {
+		ans[i], ans[j] = ans[j], ans[i]
+	})
+
+	return ans
+}
Repository: dcastil/tailwind-merge (ts)

Issue:
Fix arbitrary value using `color-mix()` function not being recognized as color
Problem from https://x.com/initjean/status/1932440932277752225 and https://gist.github.com/JeanMeijer/2471088dcabb136ca6f906054f4df723.

`border-[color-mix(in_oklab,var(--background),var(--calendar-color)_30%)]` and `border` are merged together because of the `30%` in the arbitrary value being recognized as a length. But `color-mix()` should give us signal that this is a color instead.

Pull request:
Fix arbitrary value using `color-mix()` not being detected as color
Closes #590

Patch:
diff --git a/src/lib/validators.ts b/src/lib/validators.ts
index 28c9d53..54db549 100644
--- a/src/lib/validators.ts
+++ b/src/lib/validators.ts
@@ -4,7 +4,7 @@ const fractionRegex = /^\d+\/\d+$/
 const tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/
 const lengthUnitRegex =
     /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/
-const colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/
+const colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/
 // Shadow always begins with x and y offset separated by underscore optionally prepended by inset
 const shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/
 const imageRegex =


Test patch:
diff --git a/tests/arbitrary-values.test.ts b/tests/arbitrary-values.test.ts
index 6a4d047..e2c33c9 100644
--- a/tests/arbitrary-values.test.ts
+++ b/tests/arbitrary-values.test.ts
@@ -75,6 +75,9 @@ test('handles ambiguous arbitrary values correctly', () => {
             'bg-none bg-[url(.)] bg-[image:.] bg-[url:.] bg-[linear-gradient(.)] bg-linear-to-r',
         ),
     ).toBe('bg-linear-to-r')
+    expect(
+        twMerge('border-[color-mix(in_oklab,var(--background),var(--calendar-color)_30%)] border'),
+    ).toBe('border-[color-mix(in_oklab,var(--background),var(--calendar-color)_30%)] border')
 })
 
 test('handles arbitrary custom properties correctly', () => {
Repository: sanctuary-js/sanctuary (js)

Issue:
S.pluck documentation is incorrect
The documentation for [`pluck`](https://github.com/sanctuary-js/sanctuary/blob/0853d0a592233fd602e8167760e33812d1870fa8/index.js#L3044-L3045) states that it is equivalent to `map(prop(k), xs)`. This is only the case if `xs` is an `Array`.

Either the documentation should be changed, or `pluck` should be updated to handle Functors in general (matching [`R.pluck`](http://ramdajs.com/docs/#pluck)'s behavior).

Incidentally, `R.pluck` works for Arrays and indices as well as Objects and keys (for obvious reasons).

Pull request:
array: generalize S.pluck
Fixes #381


Patch:
diff --git a/index.js b/index.js
index bf119bd..d252df7 100644
--- a/index.js
+++ b/index.js
@@ -3209,7 +3209,7 @@
   }
   S.find = def('find', {}, [Pred(a), $.Array(a), $Maybe(a)], find);
 
-  //# pluck :: Accessible a => String -> Array a -> Array b
+  //# pluck :: (Accessible a, Functor f) => String -> f a -> f b
   //.
   //. Combines [`map`](#map) and [`prop`](#prop). `pluck(k, xs)` is equivalent
   //. to `map(prop(k), xs)`.
@@ -3217,19 +3217,21 @@
   //. ```javascript
   //. > S.pluck('x', [{x: 1}, {x: 2}, {x: 3}])
   //. [1, 2, 3]
+  //.
+  //. > S.pluck('x', S.Just({x: 1, y: 2, z: 3}))
+  //. Just(1)
   //. ```
   function pluck(key, xs) {
-    return xs.map(function(x, idx) {
+    return Z.map(function(x) {
       if (key in Object(x)) return x[key];
-      throw new TypeError('‘pluck’ expected object at index ' + idx +
-                          ' to have a property named ‘' + key + '’; ' +
-                          Z.toString(x) + ' does not');
-    });
+      throw new TypeError('‘pluck’ expected object to have a property named ' +
+                          '‘' + key + '’; ' + Z.toString(x) + ' does not');
+    }, xs);
   }
   S.pluck =
   def('pluck',
-      {a: [Accessible]},
-      [$.String, $.Array(a), $.Array(b)],
+      {a: [Accessible], f: [Z.Functor]},
+      [$.String, f(a), f(b)],
       pluck);
 
   //# unfoldr :: (b -> Maybe (Pair a b)) -> b -> Array a


Test patch:
diff --git a/test/pluck.js b/test/pluck.js
index 05c7062..58106ec 100644
--- a/test/pluck.js
+++ b/test/pluck.js
@@ -10,13 +10,16 @@ test('pluck', function() {
 
   eq(typeof S.pluck, 'function');
   eq(S.pluck.length, 2);
-  eq(S.pluck.toString(), 'pluck :: Accessible a => String -> Array a -> Array b');
+  eq(S.pluck.toString(), 'pluck :: (Accessible a, Functor f) => String -> f a -> f b');
 
   throws(function() { S.pluck('a', [{a: 1}, {b: 2}]); },
          TypeError,
-         '‘pluck’ expected object at index 1 to have a property named ‘a’; {"b": 2} does not');
+         '‘pluck’ expected object to have a property named ‘a’; {"b": 2} does not');
 
   eq(S.pluck('x', []), []);
   eq(S.pluck('x', [{x: 1}, {x: 2}, {x: 3}]), [1, 2, 3]);
 
+  eq(S.pluck('x', S.Nothing), S.Nothing);
+  eq(S.pluck('x', S.Just({x: 1, y: 2, z: 3})), S.Just(1));
+
 });
Repository: kamilkisiela/graphql-inspector (ts)

Issue:
coverage error if __typename is in the query
It seems that coverage throws error if the query contains the field `__typename` in the following line:
https://github.com/kamilkisiela/graphql-inspector/blob/e87c322703f305323cff947a156a5709877978c7/packages/core/src/coverage/index.ts#L66

Do you think it is OK to simple ignore it?

Pull request:
fix coverage error if __typename is in the query
Fix #352 


Patch:
diff --git a/packages/core/src/coverage/index.ts b/packages/core/src/coverage/index.ts
index 82bb088c..6b1972c3 100644
--- a/packages/core/src/coverage/index.ts
+++ b/packages/core/src/coverage/index.ts
@@ -61,7 +61,7 @@ export function coverage(
       const fieldDef = typeInfo.getFieldDef();
       const parent = typeInfo.getParentType();
 
-      if (parent && fieldDef) {
+      if (parent && fieldDef && fieldDef.name !== '__typename') {
         const locations =
           coverage.types[parent.name].children[fieldDef.name].locations[
             source.name


Test patch:
diff --git a/packages/core/__tests__/coverage/coverage.ts b/packages/core/__tests__/coverage/coverage.ts
index 6f987c68..ad008e84 100644
--- a/packages/core/__tests__/coverage/coverage.ts
+++ b/packages/core/__tests__/coverage/coverage.ts
@@ -33,6 +33,7 @@ describe('coverage', () => {
       query getPost {
         post {
           id
+          __typename
           title
         }
       }