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

Issue:
Day 281
Good morning! Here's your coding interview problem for today.

This problem was asked by LinkedIn.

A wall consists of several rows of bricks of various integer lengths and uniform height. Your goal is to find a vertical line going from the top to the bottom of the wall that cuts through the fewest number of bricks. If the line goes through the edge between two bricks, this does not count as a cut.

For example, suppose the input is as follows, where values in each row represent the lengths of bricks in that row:
```
[[3, 5, 1, 1],
 [2, 3, 3, 2],
 [5, 5],
 [4, 4, 2],
 [1, 3, 3, 3],
 [1, 1, 6, 1, 1]]
```
The best we can we do here is to draw a line after the eighth brick, which will only require cutting through the bricks in the third and fifth row.

Given an input consisting of brick lengths for each row such as the one above, return the fewest number of bricks that must be cut to create a vertical line.

Pull request:
Day281
Resolves #572.

Patch:
diff --git a/README.md b/README.md
index ea8ce27..68457b0 100644
--- a/README.md
+++ b/README.md
@@ -286,3 +286,4 @@ problems from
 * [Day 278](https://github.com/vaskoz/dailycodingproblem-go/issues/565)
 * [Day 279](https://github.com/vaskoz/dailycodingproblem-go/issues/566)
 * [Day 280](https://github.com/vaskoz/dailycodingproblem-go/issues/568)
+* [Day 281](https://github.com/vaskoz/dailycodingproblem-go/issues/572)
diff --git a/day281/problem.go b/day281/problem.go
new file mode 100644
index 0000000..0fd8ed9
--- /dev/null
+++ b/day281/problem.go
@@ -0,0 +1,22 @@
+package day281
+
+// FewestBricksCut return the fewest number of
+// bricks that must be cut to create a vertical line.
+func FewestBricksCut(bricks [][]int) int {
+	cumm := make(map[int]int)
+	for _, row := range bricks {
+		last := 0
+		for _, brick := range row {
+			last += brick
+			cumm[last]++
+		}
+		delete(cumm, last)
+	}
+	var most int
+	for _, count := range cumm {
+		if count > most {
+			most = count
+		}
+	}
+	return len(bricks) - most
+}


Test patch:
diff --git a/day281/problem_test.go b/day281/problem_test.go
new file mode 100644
index 0000000..b92786b
--- /dev/null
+++ b/day281/problem_test.go
@@ -0,0 +1,38 @@
+package day281
+
+import "testing"
+
+// nolint
+var testcases = []struct {
+	bricks [][]int
+	fewest int
+}{
+	{
+		[][]int{
+			{3, 5, 1, 1},
+			{2, 3, 3, 2},
+			{5, 5},
+			{4, 4, 2},
+			{1, 3, 3, 3},
+			{1, 1, 6, 1, 1},
+		},
+		2,
+	},
+}
+
+func TestFewestBricksCut(t *testing.T) {
+	t.Parallel()
+	for _, tc := range testcases {
+		if result := FewestBricksCut(tc.bricks); result != tc.fewest {
+			t.Errorf("Expected %v, got %v", tc.fewest, result)
+		}
+	}
+}
+
+func BenchmarkFewestBricksCut(b *testing.B) {
+	for i := 0; i < b.N; i++ {
+		for _, tc := range testcases {
+			FewestBricksCut(tc.bricks)
+		}
+	}
+}
Repository: commanded/commanded (elixir)

Issue:
Router timout :infinity match error
Guard clause https://github.com/commanded/commanded/blob/master/lib/commanded/aggregates/aggregate.ex#L113-L114 prevents `:infinity` timeout

Pull request:
allow infinity timeout
Fixes #225 

Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c689d44..d08592b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -15,6 +15,7 @@
 - Generate specs and docs for Router dispatch functions only once ([#206](https://github.com/commanded/commanded/pull/206)).
 - Allow two-arity predicate function in `wait_for_event` receiving both event data and recorded event struct ([#213](https://github.com/commanded/commanded/pull/213)).
 - Make poison an optional dependency ([#215](https://github.com/commanded/commanded/pull/215)).
+- Allow `:infinity` timeout on command dispatch ([#227](https://github.com/commanded/commanded/pull/227))
 
 ### Bug fixes
 
diff --git a/lib/commanded/aggregates/aggregate.ex b/lib/commanded/aggregates/aggregate.ex
index 5f543b2..eb13a56 100644
--- a/lib/commanded/aggregates/aggregate.ex
+++ b/lib/commanded/aggregates/aggregate.ex
@@ -111,7 +111,7 @@ defmodule Commanded.Aggregates.Aggregate do
 
   """
   def execute(aggregate_module, aggregate_uuid, %ExecutionContext{} = context, timeout \\ 5_000)
-      when is_atom(aggregate_module) and is_binary(aggregate_uuid) and is_number(timeout) do
+      when is_atom(aggregate_module) and is_binary(aggregate_uuid) and is_number(timeout) or timeout == :infinity do
     GenServer.call(
       via_name(aggregate_module, aggregate_uuid),
       {:execute_command, context},


Test patch:
diff --git a/test/commands/command_timeout_test.exs b/test/commands/command_timeout_test.exs
index e02c797..35acd58 100644
--- a/test/commands/command_timeout_test.exs
+++ b/test/commands/command_timeout_test.exs
@@ -23,4 +23,12 @@ defmodule Commanded.Commands.CommandTimeoutTest do
         2_000
       )
   end
+
+  test "should accept :infinity as timeout option" do
+    :ok =
+      TimeoutRouter.dispatch(
+        %TimeoutCommand{aggregate_uuid: UUID.uuid4(), sleep_in_ms: 1},
+        :infinity
+      )
+  end
 end
Repository: couds/react-bulma-components (js)

Issue:
`<Icon text>` enables both `icon` and `icon-text` classes causing layout issue.
**Describe the bug**
Refer to [this discussion](https://github.com/couds/react-bulma-components/discussions/334)

**To Reproduce**
Refer to [this discussion](https://github.com/couds/react-bulma-components/discussions/334). @Tstassin was able to reproduce this issue in the code sandbox they provided.

**Expected behavior**
`<Icon text` should only enable `icon-text` class.

**Screenshots**
N/A

**Versions**
- `react-bulma-components:`: v4
- `bulma`: N/A
- `react`: N/A
- Browser: N/A

**Additional context**
cc @Tstassin


Pull request:
add only icon-text class when Icon text prop is enabled
Currently if `Icon` `text` prop is enabled, both `icon` and `icon-text` classes are added, causing layout issue. From Bulma's documentation, only the `icon-text` class is required. This PR addresses this issue.

Closes #335, cc @Tstassin

Patch:
diff --git a/src/components/icon/icon.js b/src/components/icon/icon.js
index d1c8154..fe9f0f9 100644
--- a/src/components/icon/icon.js
+++ b/src/components/icon/icon.js
@@ -8,7 +8,8 @@ const Icon = ({ size, color, className, align, text, ...props }) => {
   return (
     <Element
       {...props}
-      className={classnames('icon', className, {
+      className={classnames(className, {
+        icon: !text,
         [`is-${size}`]: size,
         [`is-${align}`]: align,
         [`has-text-${color}`]: color,


Test patch:
diff --git a/src/components/icon/__test__/__snapshots__/icon.test.js.snap b/src/components/icon/__test__/__snapshots__/icon.test.js.snap
index a928d37..553c297 100644
--- a/src/components/icon/__test__/__snapshots__/icon.test.js.snap
+++ b/src/components/icon/__test__/__snapshots__/icon.test.js.snap
@@ -4,7 +4,7 @@ exports[`Icon component Should Exist 1`] = `[Function]`;
 
 exports[`Icon component Should concat Bulma class with classes in props 1`] = `
 <span
-  className="icon other-class"
+  className="other-class icon"
   icon="bars"
 />
 `;
@@ -15,3 +15,10 @@ exports[`Icon component Should have box classname 1`] = `
   icon="bars"
 />
 `;
+
+exports[`Icon component Should only enable icon-text class if text prop is enabled 1`] = `
+<span
+  className="icon-text"
+  icon="bars"
+/>
+`;
diff --git a/src/components/icon/__test__/icon.test.js b/src/components/icon/__test__/icon.test.js
index 2e7fa51..84a0dd8 100644
--- a/src/components/icon/__test__/icon.test.js
+++ b/src/components/icon/__test__/icon.test.js
@@ -16,4 +16,8 @@ describe('Icon component', () => {
     );
     expect(component.toJSON()).toMatchSnapshot();
   });
+  it('Should only enable icon-text class if text prop is enabled', () => {
+    const component = renderer.create(<Icon text icon="bars" />);
+    expect(component.toJSON()).toMatchSnapshot();
+  });
 });
Repository: goccy/go-yaml (go)

Issue:
bug on inline array reading 
https://play.golang.org/p/l3cZy3n9T62

```
package main

import (
	"fmt"
	"github.com/goccy/go-yaml"
	y "gopkg.in/yaml.v2"
)

func main() {
	yml := `
- a: [2 , 2] 			
  b: [2 , 2] 			
  c: [2 , 2]`
	var d interface{}
	yaml.Unmarshal([]byte(yml), &d)
	fmt.Printf("%v\n%v\n", yml, d)
	y.Unmarshal([]byte(yml), &d)
	fmt.Printf("%v\n%v\n", yml, d)
}
- a: [2 , 2] 			
  b: [2 , 2] 			
  c: [2 , 2]
[map[a:[2 2]]]

- a: [2 , 2] 			
  b: [2 , 2] 			
  c: [2 , 2]
[map[a:[2 2] b:[2 2] c:[2 2]]]
```

Pull request:
Fix handling of tab characters as unnecessary character
fix #128 


Patch:
diff --git a/scanner/context.go b/scanner/context.go
index 32fceb9..e629a5c 100644
--- a/scanner/context.go
+++ b/scanner/context.go
@@ -88,14 +88,14 @@ func (c *Context) addBuf(r rune) {
 		return
 	}
 	c.buf = append(c.buf, r)
-	if r != ' ' {
+	if r != ' ' && r != '\t' {
 		c.notSpaceCharPos = len(c.buf)
 	}
 }
 
 func (c *Context) addOriginBuf(r rune) {
 	c.obuf = append(c.obuf, r)
-	if r != ' ' {
+	if r != ' ' && r != '\t' {
 		c.notSpaceOrgCharPos = len(c.obuf)
 	}
 }
diff --git a/scanner/scanner.go b/scanner/scanner.go
index d92c23c..2ab8980 100644
--- a/scanner/scanner.go
+++ b/scanner/scanner.go
@@ -360,7 +360,7 @@ func (s *Scanner) scanLiteral(ctx *Context, c rune) {
 func (s *Scanner) scanLiteralHeader(ctx *Context) (pos int, err error) {
 	header := ctx.currentChar()
 	ctx.addOriginBuf(header)
-	ctx.progress(1) // skip '|' or '<' character
+	ctx.progress(1) // skip '|' or '>' character
 	for idx, c := range ctx.src[ctx.idx:] {
 		pos = idx
 		ctx.addOriginBuf(c)


Test patch:
diff --git a/decode_test.go b/decode_test.go
index 530c827..1e0f246 100644
--- a/decode_test.go
+++ b/decode_test.go
@@ -2048,3 +2048,20 @@ func TestDecoder_LiteralWithNewLine(t *testing.T) {
 		}
 	}
 }
+
+func TestDecoder_TabCharacterAtRight(t *testing.T) {
+	yml := `
+- a: [2 , 2] 			
+  b: [2 , 2] 			
+  c: [2 , 2]`
+	var v []map[string][]int
+	if err := yaml.Unmarshal([]byte(yml), &v); err != nil {
+		t.Fatal(err)
+	}
+	if len(v) != 1 {
+		t.Fatalf("failed to unmarshal %+v", v)
+	}
+	if len(v[0]) != 3 {
+		t.Fatalf("failed to unmarshal %+v", v)
+	}
+}