PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: styled-system/styled-system (js)

Issue:
Add `flexBasis` support in `@styled-system/css`

Pull request:
styled-system/css add support for SVG properties and flexBasis
Fixes #675 system-ui/theme-ui#275

Patch:
diff --git a/packages/css/src/index.js b/packages/css/src/index.js
index c3225bc..2562b68 100644
--- a/packages/css/src/index.js
+++ b/packages/css/src/index.js
@@ -109,6 +109,10 @@ const scales = {
   height: 'sizes',
   minHeight: 'sizes',
   maxHeight: 'sizes',
+  flexBasis: 'sizes',
+  // svg
+  fill: 'colors',
+  stroke: 'colors',
 }
 
 const positiveOrNegative = (scale, value) => {


Test patch:
diff --git a/packages/css/test/index.js b/packages/css/test/index.js
index 2cb23da..9c14787 100644
--- a/packages/css/test/index.js
+++ b/packages/css/test/index.js
@@ -15,6 +15,9 @@ const theme = {
   fontWeights: {
     bold: 600,
   },
+  sizes: {
+    sidebar: 320,
+  },
   buttons: {
     primary: {
       p: 3,
@@ -348,4 +351,24 @@ test('returns individual border styles', () => {
     borderLeftWidth: 1,
     borderLeftStyle: 'solid',
   })
-})
\ No newline at end of file
+})
+
+test('flexBasis uses theme.sizes', () => {
+  const style = css({
+    flexBasis: 'sidebar',
+  })(theme)
+  expect(style).toEqual({
+    flexBasis: 320,
+  })
+})
+
+test('fill and stroke use theme.colors', () => {
+  const style = css({
+    fill: 'primary',
+    stroke: 'secondary',
+  })(theme)
+  expect(style).toEqual({
+    fill: 'tomato',
+    stroke: 'cyan',
+  })
+})
Repository: vaskoz/dailycodingproblem-go (go)

Issue:
Day 271
Good morning! Here's your coding interview problem for today.

This problem was asked by Netflix.

Given a sorted list of integers of length `N`, determine if an element `x` is in the list without performing any multiplication, division, or bit-shift operations.

Do this in **O(log N)** time.

Pull request:
Day271
Resolves #553.

Patch:
diff --git a/README.md b/README.md
index 4dac06d..91ed69c 100644
--- a/README.md
+++ b/README.md
@@ -277,3 +277,4 @@ problems from
 * [Day 268](https://github.com/vaskoz/dailycodingproblem-go/issues/544)
 * [Day 269](https://github.com/vaskoz/dailycodingproblem-go/issues/547)
 * [Day 270](https://github.com/vaskoz/dailycodingproblem-go/issues/548)
+* [Day 271](https://github.com/vaskoz/dailycodingproblem-go/issues/553)
diff --git a/day271/problem.go b/day271/problem.go
new file mode 100644
index 0000000..73bcb69
--- /dev/null
+++ b/day271/problem.go
@@ -0,0 +1,29 @@
+package day271
+
+import "sort"
+
+// BinarySearch is a handwritten binary search.
+func BinarySearch(sorted []int, x int) int {
+	left, right := 0, len(sorted)-1
+	for left < right {
+		mid := (left + right) / 2
+		val := sorted[mid]
+		if x < val {
+			right = mid - 1
+		} else if x == val {
+			return mid
+		} else {
+			left = mid + 1
+		}
+	}
+	return -1
+}
+
+// BinarySearchSortPkg delegates to the sort package.
+func BinarySearchSortPkg(sorted []int, x int) int {
+	index := sort.SearchInts(sorted, x)
+	if sorted[index] == x {
+		return index
+	}
+	return -1
+}


Test patch:
diff --git a/day271/problem_test.go b/day271/problem_test.go
new file mode 100644
index 0000000..fddc4f1
--- /dev/null
+++ b/day271/problem_test.go
@@ -0,0 +1,47 @@
+package day271
+
+import "testing"
+
+// nolint
+var testcases = []struct {
+	sorted   []int
+	x        int
+	contains bool
+}{
+	{[]int{1, 10, 11, 12, 14, 15}, 11, true},
+	{[]int{1, 10, 11, 12, 14, 15}, 7, false},
+}
+
+func TestBinarySearch(t *testing.T) {
+	t.Parallel()
+	for tcid, tc := range testcases {
+		if index := BinarySearch(tc.sorted, tc.x); (index > 0) != tc.contains {
+			t.Errorf("TCID %d, expected %v, got %v", tcid, tc.contains, (index > 0))
+		}
+	}
+}
+
+func BenchmarkBinarySearch(b *testing.B) {
+	for i := 0; i < b.N; i++ {
+		for _, tc := range testcases {
+			BinarySearch(tc.sorted, tc.x)
+		}
+	}
+}
+
+func TestBinarySearchSortPkg(t *testing.T) {
+	t.Parallel()
+	for tcid, tc := range testcases {
+		if index := BinarySearchSortPkg(tc.sorted, tc.x); (index >= 0) != tc.contains {
+			t.Errorf("TCID %d, expected %v, got %v", tcid, tc.contains, (index > 0))
+		}
+	}
+}
+
+func BenchmarkBinarySearchSortPkg(b *testing.B) {
+	for i := 0; i < b.N; i++ {
+		for _, tc := range testcases {
+			BinarySearchSortPkg(tc.sorted, tc.x)
+		}
+	}
+}
Repository: pgmpy/pgmpy (python)

Issue:
Remove nodes without CPD
[This line](https://github.com/pgmpy/pgmpy/blob/dev/pgmpy/models/BayesianModel.py#L165) checks whether the node has CPD by getting its CPD. However, get_cpds will raise an error if the node doesn't have a CPD. So that line will break when there is no CPD for the node.

@ankurankan I can fix it, but I need your input on whether to have get_cpds return None if the CPD doesn't exist, or to check the existence of CPD in other ways?

Pull request:
Fixed #872
@ankurankan Please review

Patch:
diff --git a/pgmpy/models/BayesianModel.py b/pgmpy/models/BayesianModel.py
index 7d8cb8ba..1823c05c 100644
--- a/pgmpy/models/BayesianModel.py
+++ b/pgmpy/models/BayesianModel.py
@@ -285,7 +285,8 @@ class BayesianModel(DirectedGraph):
             for cpd in self.cpds:
                 if cpd.variable == node:
                     return cpd
-            raise ValueError("CPD not added for the node: {node}".format(node=node))
+            else:
+                return None
         else:
             return self.cpds
 
@@ -346,7 +347,9 @@ class BayesianModel(DirectedGraph):
         for node in self.nodes():
             cpd = self.get_cpds(node=node)
 
-            if isinstance(cpd, TabularCPD):
+            if cpd is None:
+                raise ValueError('No CPD associated with {}'.format(node))
+            elif isinstance(cpd, TabularCPD):
                 evidence = cpd.variables[:0:-1]
                 parents = self.get_parents(node)
                 if set(evidence if evidence else []) != set(parents if parents else []):


Test patch:
diff --git a/pgmpy/tests/test_models/test_BayesianModel.py b/pgmpy/tests/test_models/test_BayesianModel.py
index 7f876519..8d5a304e 100644
--- a/pgmpy/tests/test_models/test_BayesianModel.py
+++ b/pgmpy/tests/test_models/test_BayesianModel.py
@@ -282,7 +282,7 @@ class TestBayesianModelCPD(unittest.TestCase):
         self.assertRaises(ValueError, self.model.get_cpds, 'B')
 
         self.model.add_node('B')
-        self.assertRaises(ValueError, self.model.get_cpds, 'B')
+        self.assertIsNone(self.model.get_cpds('B'))
 
     def test_add_single_cpd(self):
         cpd_s = TabularCPD('s', 2, np.random.rand(2, 2), ['i'], [2])
Repository: mgechev/revive (go)

Issue:
Rule 'var-naming' should allow Fuzz_xxx()
**Is your feature request related to a problem? Please describe.**
In Go 1.18, [fuzzing is officially supported](https://go.dev/doc/fuzz/). FuzzXxx should be treated as same as TestXxx, BenchmarkXxx, ExampleXxx, which can use underscore(`_`) in the function name.
For example, if you are developing `big.Int` and add a fuzz test to `big.Int.SetString`, the test function's name will be `FuzzInt_SetString`.

**Describe the solution you'd like**
I haven't tested it, but I think adding a condition [here](https://github.com/mgechev/revive/blob/v1.1.2/rule/var-naming.go#L144) would be enough.

Pull request:
fix #622 (Rule 'var-naming' should allow Fuzz_xxx)
Closes #622 


Patch:
diff --git a/rule/var-naming.go b/rule/var-naming.go
index 49db020..1de8608 100644
--- a/rule/var-naming.go
+++ b/rule/var-naming.go
@@ -145,7 +145,12 @@ func (w *lintNames) Visit(n ast.Node) ast.Visitor {
 			}
 		}
 	case *ast.FuncDecl:
-		if w.file.IsTest() && (strings.HasPrefix(v.Name.Name, "Example") || strings.HasPrefix(v.Name.Name, "Test") || strings.HasPrefix(v.Name.Name, "Benchmark")) {
+		funcName := v.Name.Name
+		if w.file.IsTest() &&
+			(strings.HasPrefix(funcName, "Example") ||
+				strings.HasPrefix(funcName, "Test") ||
+				strings.HasPrefix(funcName, "Benchmark") ||
+				strings.HasPrefix(funcName, "Fuzz")) {
 			return w
 		}
 


Test patch:
diff --git a/test/var-naming_test.go b/test/var-naming_test.go
index 2d0bf75..b6ccd41 100644
--- a/test/var-naming_test.go
+++ b/test/var-naming_test.go
@@ -11,4 +11,6 @@ func TestVarNaming(t *testing.T) {
 	testRule(t, "var-naming", &rule.VarNamingRule{}, &lint.RuleConfig{
 		Arguments: []interface{}{[]interface{}{"ID"}, []interface{}{"VM"}},
 	})
+
+	testRule(t, "var-naming_test", &rule.VarNamingRule{}, &lint.RuleConfig{})
 }
diff --git a/testdata/var-naming_test.go b/testdata/var-naming_test.go
new file mode 100644
index 0000000..dadf61d
--- /dev/null
+++ b/testdata/var-naming_test.go
@@ -0,0 +1,12 @@
+// Test for name linting.
+
+// Package pkg_with_underscores ...
+package varnaming_test
+
+var var_name int // MATCH /don't use underscores in Go names; var var_name should be varName/
+
+func Test_ATest()           {}
+func Example_AnExample()    {}
+func Benchmark_ABenchmark() {}
+
+func Fuzz_AFuzz() {}
Repository: jquense/yup (ts)

Issue:
baseSchema.concat(otherSchema) overwrites baseSchema properties when otherSchema properties are undefined
**Describe the bug**
Last_Edit: It is because of this code https://github.com/jquense/yup/blob/master/src/schema.ts#L231-L233 , `combined.spec` has every property `undefined`, it would work if `combined.spec` properties were non-existent instead of `undefined`:

`const mergedSpec = { ...base.spec, ...combined.spec };`

First_Edit: Looking a bit deeper, i am now not sure if it is caused by mixed.label(), but since the only thing we change is the yup version and this unexpected behavior occurs, i will keep this issue as is, hopefully someone experienced in yup can investigate or realize the reason why this happens.

Calling mixed.label("Custom label") does work on version 0.31.0 but not on 0.32.5+.
Example screenshots from v.0.31.0 and v.0.32.5+
v.0.31.0:

![before_update](https://user-images.githubusercontent.com/69463668/101590988-7a388b80-39fc-11eb-9f1d-ecd3609fd3e6.png)

v.0.32.5+:

![after_update](https://user-images.githubusercontent.com/69463668/101591037-963c2d00-39fc-11eb-99bd-64dcd6e01e37.png)


**To Reproduce**
Quite complex form logic react and formik, will try to extract the logic and edit here.

**Expected behavior**
I would expect the previous behavior of setting a label to work on error messages.

**Platform (please complete the following information):**
 - Browser [chrome]
 - Version [86]


**Additional context**
Using with react + formik 


Pull request:
Do not initialize spec values with undefined
Otherwise spreading spec values like previously would overwrite the base schema spec values with undefined.
Closes #1160. 

Patch:
diff --git a/src/schema.ts b/src/schema.ts
index 7ffaccd..d80d1d8 100644
--- a/src/schema.ts
+++ b/src/schema.ts
@@ -137,8 +137,6 @@ export default abstract class BaseSchema<
       strict: false,
       abortEarly: true,
       recursive: true,
-      label: undefined,
-      meta: undefined,
       nullable: false,
       presence: 'optional',
       ...options?.spec,


Test patch:
diff --git a/test/mixed.js b/test/mixed.js
index c6551bf..01ae82a 100644
--- a/test/mixed.js
+++ b/test/mixed.js
@@ -645,6 +645,19 @@ describe('Mixed Types ', () => {
     }.should.throw(TypeError));
   });
 
+  it('concat should not overwrite label and meta with undefined', function () {
+    const testLabel = "Test Label"
+    const testMeta = {
+      testField: "test field"
+    }
+    let baseSchema = mixed().label(testLabel).meta(testMeta)
+    const otherSchema = mixed()
+
+    baseSchema = baseSchema.concat(otherSchema)
+    expect(baseSchema.spec.label).to.equal(testLabel)
+    expect(baseSchema.spec.meta.testField).to.equal(testMeta.testField)
+  })
+
   it('concat should allow mixed and other type', function () {
     let inst = mixed().default('hi');
Repository: semantic-release/semantic-release (js)

Issue:
generateNotes doesn't accept multiple plugins from CLI
It appears that when [`generateNotes` was updated to be a "multi plugin" (like `verify-release`) in 15.7.0](https://github.com/semantic-release/semantic-release/commit/5989989), the CLI configuration was overlooked:

```js
    .option('verify-release', {...stringList, group: 'Plugins'})
    .option('generate-notes', {type: 'string', group: 'Plugins'})
```

https://github.com/semantic-release/semantic-release/blob/caribou/cli.js#L27


Pull request:
fix: support multiple generate-notes plugin in CLI arg
Fix #923

Patch:
diff --git a/cli.js b/cli.js
index 7ab6e0c..7583bb1 100755
--- a/cli.js
+++ b/cli.js
@@ -27,7 +27,7 @@ Usage:
     .option('verify-conditions', {...stringList, group: 'Plugins'})
     .option('analyze-commits', {type: 'string', group: 'Plugins'})
     .option('verify-release', {...stringList, group: 'Plugins'})
-    .option('generate-notes', {type: 'string', group: 'Plugins'})
+    .option('generate-notes', {...stringList, group: 'Plugins'})
     .option('prepare', {...stringList, group: 'Plugins'})
     .option('publish', {...stringList, group: 'Plugins'})
     .option('success', {...stringList, group: 'Plugins'})


Test patch:
diff --git a/test/cli.test.js b/test/cli.test.js
index 2b1a291..1d21a58 100644
--- a/test/cli.test.js
+++ b/test/cli.test.js
@@ -72,7 +72,7 @@ test.serial('Pass options to semantic-release API', async t => {
   t.deepEqual(run.args[0][0].verifyConditions, ['condition1', 'condition2']);
   t.is(run.args[0][0].analyzeCommits, 'analyze');
   t.deepEqual(run.args[0][0].verifyRelease, ['verify1', 'verify2']);
-  t.is(run.args[0][0].generateNotes, 'notes');
+  t.deepEqual(run.args[0][0].generateNotes, ['notes']);
   t.deepEqual(run.args[0][0].prepare, ['prepare1', 'prepare2']);
   t.deepEqual(run.args[0][0].publish, ['publish1', 'publish2']);
   t.deepEqual(run.args[0][0].success, ['success1', 'success2']);
Repository: FriendsOfPHP/PHP-CS-Fixer (php)

Issue:
PhpdocToCommentFixer false positive with property promotion
## Bug report

![Screenshot from 2021-08-23 13-53-24](https://user-images.githubusercontent.com/539462/130443054-e97c2d03-8236-4fd9-a300-c3e55f42df39.png)

### Code snippet that reproduces the problem

```php
use Symfony\Component\Validator\Constraints as Assert;

class X
{
	public function __construct(
		/**
		 * @Assert\NotBlank()
		 */
		public string $x
	) {
	}
}

```


Pull request:
CommentsAnalyzer - constructor property promotion support
Closes #5893 

Patch:
diff --git a/src/Tokenizer/Analyzer/CommentsAnalyzer.php b/src/Tokenizer/Analyzer/CommentsAnalyzer.php
index 309a93669..37e12d3a0 100644
--- a/src/Tokenizer/Analyzer/CommentsAnalyzer.php
+++ b/src/Tokenizer/Analyzer/CommentsAnalyzer.php
@@ -171,6 +171,9 @@ private function isStructuralElement(Tokens $tokens, int $index): bool
                 T_INCLUDE,
                 T_INCLUDE_ONCE,
                 T_FINAL,
+                CT::T_CONSTRUCTOR_PROPERTY_PROMOTION_PUBLIC,
+                CT::T_CONSTRUCTOR_PROPERTY_PROMOTION_PROTECTED,
+                CT::T_CONSTRUCTOR_PROPERTY_PROMOTION_PRIVATE,
             ];
 
             if (\defined('T_READONLY')) { // @TODO: drop condition when PHP 8.1+ is required


Test patch:
diff --git a/tests/Fixer/Phpdoc/PhpdocToCommentFixerTest.php b/tests/Fixer/Phpdoc/PhpdocToCommentFixerTest.php
index 1d7879c67..6c1291e5a 100644
--- a/tests/Fixer/Phpdoc/PhpdocToCommentFixerTest.php
+++ b/tests/Fixer/Phpdoc/PhpdocToCommentFixerTest.php
@@ -879,6 +879,18 @@ public function foo() {}
      */
 }',
             ],
+            [
+                '<?php
+class Foo
+{
+	public function __construct(
+	    /** @var string Do not convert this */
+		public string $bar
+	) {
+	}
+}
+',
+            ],
         ];
     }
 }
Repository: Peternator7/strum (rust)

Issue:
strum-macros 0.26.3 breaks `no_std` build
With 0.26.3, the emitted code when using `derive(strum::Display)` uses `format!` unconditionally. This requires the surrounding code to `use format::alloc;`, which seems like an unfortunate breaking change to me.

Example `main.rs`:

```rust
#![no_std]

#[derive(strum::Display)]
enum Foo {
    Bar
}

fn main() {
}
```

Sample `Cargo.toml`:

```toml
[package]
name = "strumtest"
version = "0.1.0"
edition = "2021"

[dependencies]
strum = { version = "0.26.2", features = ["derive"] }
strum_macros = { version = "0.26.3" }
```

If you downgrade to `=0.26.2` the build works, otherwise it aborts with:

```
error: cannot find macro `format` in this scope
 --> src/main.rs:3:10
  |
3 | #[derive(strum::Display)]
  |          ^^^^^^^^^^^^^^
  |
  = note: this error originates in the derive macro `strum::Display` (in Nightly builds, run with -Z macro-backtrace for more info)

error: could not compile `strumtest` (bin "strumtest") due to 1 previous error
```

I think it's okay to require the surrounding `no_std` code to `use alloc::format;` when using `strum`, but it would be great if this requirement could come with a new major version (0.27) instead.



Pull request:
Fix the unconditional usage of string interpolation in strum
fixes #359 

Patch:
diff --git a/strum_macros/src/macros/strings/display.rs b/strum_macros/src/macros/strings/display.rs
index 650e5b2..5e7a422 100644
--- a/strum_macros/src/macros/strings/display.rs
+++ b/strum_macros/src/macros/strings/display.rs
@@ -124,7 +124,17 @@ pub fn display_inner(ast: &DeriveInput) -> syn::Result<TokenStream> {
                         }
                     }
                 }
-                Fields::Unit => quote! { #name::#ident #params => ::core::fmt::Display::fmt(&format!(#output), f) }
+                Fields::Unit => {
+                    let used_vars = capture_format_strings(&output)?;
+                    if !used_vars.is_empty() {
+                        return Err(syn::Error::new_spanned(
+                            &output,
+                            "Unit variants do not support interpolation",
+                        ));
+                    }
+
+                    quote! { #name::#ident #params => ::core::fmt::Display::fmt(#output, f) }
+                }
             };
 
             arms.push(arm);


Test patch:
diff --git a/strum_nostd_tests/src/lib.rs b/strum_nostd_tests/src/lib.rs
index 816c073..251fe03 100644
--- a/strum_nostd_tests/src/lib.rs
+++ b/strum_nostd_tests/src/lib.rs
@@ -5,7 +5,7 @@ mod tests {
     use core::str::FromStr;
     use strum::EnumString;
 
-    #[derive(Debug, Eq, PartialEq, EnumString)]
+    #[derive(Debug, Eq, PartialEq, EnumString, strum::Display)]
     enum Color {
         Red,
         Blue {
Repository: vaskoz/dailycodingproblem-go (go)

Issue:
Day 225
Good morning! Here's your coding interview problem for today.

This problem was asked by Bloomberg.

There are N prisoners standing in a circle, waiting to be executed. The executions are carried out starting with the kth person, and removing every successive kth person going clockwise until there is no one left.

Given N and k, write an algorithm to determine where a prisoner should stand in order to be the last survivor.

For example, if N = 5 and k = 2, the order of executions would be [2, 4, 1, 5, 3], so you should return 3.

Bonus: Find an O(log N) solution if k = 2.

Pull request:
Day225
Resolves #465 

Patch:
diff --git a/README.md b/README.md
index 7f50028..3626459 100644
--- a/README.md
+++ b/README.md
@@ -235,3 +235,4 @@ problems from
 * [Day 222](https://github.com/vaskoz/dailycodingproblem-go/issues/458)
 * [Day 223](https://github.com/vaskoz/dailycodingproblem-go/issues/460)
 * [Day 224](https://github.com/vaskoz/dailycodingproblem-go/issues/462)
+* [Day 225](https://github.com/vaskoz/dailycodingproblem-go/issues/465)
diff --git a/day225/problem.go b/day225/problem.go
new file mode 100644
index 0000000..c4a7075
--- /dev/null
+++ b/day225/problem.go
@@ -0,0 +1,25 @@
+package day225
+
+import "math/bits"
+
+// JosephusGeneral is the general case solution.
+func JosephusGeneral(n, k int) int {
+	switch {
+	case n < 1:
+		return 0
+	case n == 1:
+		return 1
+	case k == 2:
+		highestBitValue := 1 << uint(bits.Len64(uint64(n))-1)
+		return 2*(n-highestBitValue) + 1
+	default:
+		return josephusGeneral(n, k) + 1
+	}
+}
+
+func josephusGeneral(n, k int) int {
+	if n == 1 {
+		return 0
+	}
+	return (josephusGeneral(n-1, k) + k) % n
+}


Test patch:
diff --git a/day225/problem_test.go b/day225/problem_test.go
new file mode 100644
index 0000000..44bffba
--- /dev/null
+++ b/day225/problem_test.go
@@ -0,0 +1,31 @@
+package day225
+
+import "testing"
+
+var testcases = []struct {
+	n, k, survivor int
+}{
+	{5, 2, 3},
+	{41, 2, 19},
+	{5, 3, 4},
+	{1, 100, 1},
+	{-20, 100, 0},
+	{0, 100, 0},
+}
+
+func TestJosephusGeneral(t *testing.T) {
+	t.Parallel()
+	for _, tc := range testcases {
+		if survivor := JosephusGeneral(tc.n, tc.k); survivor != tc.survivor {
+			t.Errorf("Given N=%d, k=%d, expected %d, got %d", tc.n, tc.k, tc.survivor, survivor)
+		}
+	}
+}
+
+func BenchmarkJosephusGeneral(b *testing.B) {
+	for i := 0; i < b.N; i++ {
+		for _, tc := range testcases {
+			JosephusGeneral(tc.n, tc.k)
+		}
+	}
+}
Repository: vaskoz/dailycodingproblem-go (go)

Issue:
Day 129
Good morning! Here's your coding interview problem for today.

Given a real number n, find the square root of n. For example, given n = 9, return 3.

Pull request:
Day129
Resolves #263.

Patch:
diff --git a/README.md b/README.md
index c554b7c..7e9d9c8 100644
--- a/README.md
+++ b/README.md
@@ -132,3 +132,4 @@ problems from
 * [Day 124](https://github.com/vaskoz/dailycodingproblem-go/issues/255)
 * [Day 125](https://github.com/vaskoz/dailycodingproblem-go/issues/257)
 * [Day 127](https://github.com/vaskoz/dailycodingproblem-go/issues/259)
+* [Day 129](https://github.com/vaskoz/dailycodingproblem-go/issues/263)
diff --git a/day129/problem.go b/day129/problem.go
new file mode 100644
index 0000000..800e6ae
--- /dev/null
+++ b/day129/problem.go
@@ -0,0 +1,8 @@
+package day129
+
+import "math"
+
+// Sqrt is a wrapper for math.Sqrt in the standard library.
+func Sqrt(n float64) float64 {
+	return math.Sqrt(n)
+}


Test patch:
diff --git a/day129/problem_test.go b/day129/problem_test.go
new file mode 100644
index 0000000..c19f1e2
--- /dev/null
+++ b/day129/problem_test.go
@@ -0,0 +1,28 @@
+package day129
+
+import "testing"
+
+var testcases = []struct {
+	n, expected float64
+}{
+	{9.0, 3.0},
+	{36.0, 6.0},
+	{81.0, 9.0},
+}
+
+func TestSqrt(t *testing.T) {
+	t.Parallel()
+	for _, tc := range testcases {
+		if result := Sqrt(tc.n); result != tc.expected {
+			t.Errorf("Expected %v got %v", tc.expected, result)
+		}
+	}
+}
+
+func BenchmarkSqrt(b *testing.B) {
+	for i := 0; i < b.N; i++ {
+		for _, tc := range testcases {
+			Sqrt(tc.n)
+		}
+	}
+}