PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: zh-lx/pinyin-pro (ts)

Issue:
支持叠字符号「々」的注音
## 功能描述

这是一个特殊功能，建议增加一个选项，默认关闭。

々的读音就是读被反复的字的读音，例如，天々(tiān)向上，这里读前面一个字的音。


- https://baike.baidu.com/item/%E3%80%85/9045440
- https://zh.wikipedia.org/wiki/%E5%8F%A0%E5%AD%97%E7%AC%A6%E5%8F%B7


Pull request:
Feature support reduplication
close #201

Patch:
diff --git a/lib/data/special.ts b/lib/data/special.ts
index d9892e9..d3ec2c9 100644
--- a/lib/data/special.ts
+++ b/lib/data/special.ts
@@ -230,8 +230,20 @@ export function processToneSandhiLiao(cur: string, pre: string) {
   }
 }
 
+// 处理叠字符[々]
+function processReduplicationChar(cur: string, pre: string) {
+  if (cur === '々') {
+    if (!pre || !DICT1.get(pre)) {
+      return 'tóng';
+    } else {
+      return DICT1.get(pre).split(' ')[0];
+    }
+  }
+}
+
 export function processSepecialPinyin(cur: string, pre: string, next: string) {
   return (
+    processReduplicationChar(cur, pre) ||
     processToneSandhiLiao(cur, pre) ||
     processToneSandhi(cur, pre, next) ||
     getSingleWordPinyin(cur)


Test patch:
diff --git a/test/special.test.js b/test/special.test.js
index 2eb767e..351ef5e 100644
--- a/test/special.test.js
+++ b/test/special.test.js
@@ -291,4 +291,15 @@ describe('[special tone sandhi]绕口令', () => {
     const result = pinyin('了吧');
     expect(result).to.be.equal('liǎo ba');
   });
+
+  it('[special 々]々', () => {
+    const result = pinyin('天々向上，好々学习');
+    expect(result).to.be.equal('tiān tiān xiàng shàng ， hǎo hǎo xué xí');
+
+    const result1 = pinyin('々々');
+    expect(result1).to.be.equal('tóng tóng');
+
+    const result2 = pinyin('々，々');
+    expect(result2).to.be.equal('tóng ， tóng');
+  });
 });
Repository: moment/luxon (js)

Issue:
ISO Duration with 10 digits seconds cannot be parsed as ISO 8601
### Steps to reproduce

```js
const duration = luxon.Duration.fromISO('PT1000000000S')
console.log(duration.invalid)
```

### Current Result

```
Object {
  explanation: "the input 'PT1000000000S' can't be parsed as ISO 8601",
  reason: "unparsable",
  toMessage: function(){return this.explanation?this.reason+": "+this.explanation:this.reason}
}
```

### Expected Result

```js
null
```

### Details

`Duration.fromISO(isoDurationString)` cannot parse an ISO Duration that has seconds with 10 or more leading digits (eg. 'PT1000000000S').

Unfortunately this is the kind of format that `DateTime.fromISO(isoDateString).diffNow().negate().toISO()` produces.

See this Codepen for a minimal example:

https://codepen.io/visualjerk/pen/rNxpVBW


Pull request:
feat: add support for large durations in seconds
Closes #731

Patch:
diff --git a/src/impl/regexParser.js b/src/impl/regexParser.js
index 1ceca9f9..62a244ef 100644
--- a/src/impl/regexParser.js
+++ b/src/impl/regexParser.js
@@ -120,7 +120,7 @@ function extractIANAZone(match, cursor) {
 
 // ISO duration parsing
 
-const isoDuration = /^-?P(?:(?:(-?\d{1,9})Y)?(?:(-?\d{1,9})M)?(?:(-?\d{1,9})W)?(?:(-?\d{1,9})D)?(?:T(?:(-?\d{1,9})H)?(?:(-?\d{1,9})M)?(?:(-?\d{1,9})(?:[.,](-?\d{1,9}))?S)?)?)$/;
+const isoDuration = /^-?P(?:(?:(-?\d{1,9})Y)?(?:(-?\d{1,9})M)?(?:(-?\d{1,9})W)?(?:(-?\d{1,9})D)?(?:T(?:(-?\d{1,9})H)?(?:(-?\d{1,9})M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,9}))?S)?)?)$/;
 
 function extractISODuration(match) {
   const [


Test patch:
diff --git a/test/duration/parse.test.js b/test/duration/parse.test.js
index b7827b4e..f8ec42db 100644
--- a/test/duration/parse.test.js
+++ b/test/duration/parse.test.js
@@ -17,6 +17,7 @@ test("Duration.fromISO can parse a variety of ISO formats", () => {
   check("P1YT34000S", { years: 1, seconds: 34000 });
   check("P1W1DT13H23M34S", { weeks: 1, days: 1, hours: 13, minutes: 23, seconds: 34 });
   check("P2W", { weeks: 2 });
+  check("PT10000000000000000000.999S", { seconds: 10000000000000000000, milliseconds: 999 });
 });
 
 test("Duration.fromISO can parse mixed or negative durations", () => {
Repository: JuliaEarth/CoordRefSystems.jl (julia)

Issue:
Add support for EPSG:3035
From the discussion at https://discourse.julialang.org/t/how-to-convert-a-point-from-a-given-2d-crs-to-another-one/114549/6

It seems I misunderstood the type of the projections supported by this package. I thought all EPSG codes were supported, but I think only the codes for generic map projections (methods?) are supported (and understandably so, EPSG is huge).

For example, [EPSG:3035](https://epsg.io/3035) was mentioned on discourse, which is the European reference system, an instance of the Lambert Azimuthal Equal Area projection.

Would be really cool if we could support almost all EPSG codes in native Julia.

Pull request:
Reference: https://epsg.io/3035
closes #78

Patch:
diff --git a/src/get.jl b/src/get.jl
index 76346039..1e316707 100644
--- a/src/get.jl
+++ b/src/get.jl
@@ -58,6 +58,7 @@ end
 # ----------------
 
 @crscode EPSG{2157} shift(TransverseMercator{0.99982,53.5°,IRENET95}, lonₒ=-8.0°, xₒ=600000.0m, yₒ=750000.0m)
+@crscode EPSG{3035} shift(LambertAzimuthalEqualArea{52.0°,ETRFLatest}, lonₒ=-10.0°, xₒ=4321000.0m, yₒ=-3210000.0m)
 @crscode EPSG{3310} shift(Albers{0.0°,34.0°,40.5°,NAD83}, lonₒ=-120.0°, yₒ=-4000000.0m)
 @crscode EPSG{3395} Mercator{WGS84Latest}
 @crscode EPSG{3857} WebMercator{WGS84Latest}
diff --git a/src/strings.jl b/src/strings.jl
index dabca032..96ebf4ea 100644
--- a/src/strings.jl
+++ b/src/strings.jl
@@ -9,6 +9,7 @@ const esriid2code = Dict(
   "British_National_Grid" => EPSG{27700},
   "ETRF2000-PL_CS92" => EPSG{2180},
   "ETRS_1989_UTM_Zone_32N" => EPSG{25832},
+  "ETRS_1989_LAEA" => EPSG{3035},
   "GCS_Datum_73" => EPSG{4274},
   "GCS_Deutsches_Hauptdreiecksnetz" => EPSG{4314},
   "GCS_European_1950" => EPSG{4230},


Test patch:
diff --git a/test/get.jl b/test/get.jl
index 1350f4a2..d305d005 100644
--- a/test/get.jl
+++ b/test/get.jl
@@ -4,8 +4,9 @@
     EPSG{2157},
     CoordRefSystems.shift(TransverseMercator{0.99982,53.5°,IRENET95}, lonₒ=-8.0°, xₒ=600000.0m, yₒ=750000.0m)
   )
-  gettest(EPSG{3395}, Mercator{WGS84Latest})
+  gettest(EPSG{3035}, CoordRefSystems.shift(LambertAzimuthalEqualArea{52.0°,ETRFLatest}, lonₒ=-10.0°, xₒ=4321000.0m, yₒ=-3210000.0m))
   gettest(EPSG{3310}, CoordRefSystems.shift(Albers{0.0°,34.0°,40.5°,NAD83}, lonₒ=-120.0°, yₒ=-4000000.0m))
+  gettest(EPSG{3395}, Mercator{WGS84Latest})
   gettest(EPSG{3857}, WebMercator{WGS84Latest})
   gettest(EPSG{4171}, LatLon{RGF93v1})
   gettest(EPSG{4207}, LatLon{Lisbon1937})
diff --git a/test/strings.jl b/test/strings.jl
index 6b8c3dfb..ad6813d7 100644
--- a/test/strings.jl
+++ b/test/strings.jl
@@ -1,5 +1,6 @@
 @testset "CRS strings" begin
   crsstringtest(EPSG{2157})
+  crsstringtest(EPSG{3035})
   crsstringtest(EPSG{3310})
   crsstringtest(EPSG{3395})
   crsstringtest(EPSG{3857})
Repository: vaskoz/dailycodingproblem-go (go)

Issue:
Day 211
Good morning! Here's your coding interview problem for today.

This problem was asked by Microsoft.

Given a string and a pattern, find the starting indices of all occurrences of the pattern in the string. For example, given the string "abracadabra" and the pattern "abr", you should return `[0, 7]`.

Pull request:
Day211
Resolves #434.

Patch:
diff --git a/README.md b/README.md
index 57c9f14..0b8b1da 100644
--- a/README.md
+++ b/README.md
@@ -220,3 +220,4 @@ problems from
 * [Day 207](https://github.com/vaskoz/dailycodingproblem-go/issues/426)
 * [Day 208](https://github.com/vaskoz/dailycodingproblem-go/issues/427)
 * [Day 210](https://github.com/vaskoz/dailycodingproblem-go/issues/432)
+* [Day 211](https://github.com/vaskoz/dailycodingproblem-go/issues/434)
diff --git a/day211/problem.go b/day211/problem.go
new file mode 100644
index 0000000..2c07abf
--- /dev/null
+++ b/day211/problem.go
@@ -0,0 +1,24 @@
+package day211
+
+// StartingIndicies returns the starting indicies
+// of all occurrences of the pattern in the str.
+// Runs in O(N*K) time where N=len(str) and K=len(pattern).
+func StartingIndicies(str, pattern string) []int {
+	var result []int
+	for i := range str {
+		if len(pattern) > len(str)-i {
+			break
+		}
+		complete := true
+		for j, pr := range pattern {
+			if pr != rune(str[i+j]) {
+				complete = false
+				break
+			}
+		}
+		if complete {
+			result = append(result, i)
+		}
+	}
+	return result
+}


Test patch:
diff --git a/day211/problem_test.go b/day211/problem_test.go
new file mode 100644
index 0000000..849ac55
--- /dev/null
+++ b/day211/problem_test.go
@@ -0,0 +1,30 @@
+package day211
+
+import (
+	"reflect"
+	"testing"
+)
+
+var testcases = []struct {
+	str, pattern string
+	expected     []int
+}{
+	{"abracadabra", "abr", []int{0, 7}},
+}
+
+func TestStartingIndicies(t *testing.T) {
+	t.Parallel()
+	for _, tc := range testcases {
+		if result := StartingIndicies(tc.str, tc.pattern); !reflect.DeepEqual(result, tc.expected) {
+			t.Errorf("Expected %v, got %v", tc.expected, result)
+		}
+	}
+}
+
+func BenchmarkStartingIndicies(b *testing.B) {
+	for i := 0; i < b.N; i++ {
+		for _, tc := range testcases {
+			StartingIndicies(tc.str, tc.pattern)
+		}
+	}
+}
Repository: vaskoz/dailycodingproblem-go (go)

Issue:
Day 165
Good morning! Here's your coding interview problem for today.

This problem was asked by Google.

Given an array of integers, return a new array where each element in the new array is the number of smaller elements to the right of that element in the original input array.

For example, given the array `[3, 4, 9, 6, 1]`, return `[1, 1, 2, 1, 0]`, since:

* There is 1 smaller element to the right of 3
* There is 1 smaller element to the right of 4
* There are 2 smaller elements to the right of 9
* There is 1 smaller element to the right of 6
* There are no smaller elements to the right of 1

Pull request:
Day165
Resolves #343.

Patch:
diff --git a/README.md b/README.md
index 6e93cfe..71d9ed0 100644
--- a/README.md
+++ b/README.md
@@ -175,3 +175,4 @@ problems from
 * [Day 162](https://github.com/vaskoz/dailycodingproblem-go/issues/335)
 * [Day 163](https://github.com/vaskoz/dailycodingproblem-go/issues/336)
 * [Day 164](https://github.com/vaskoz/dailycodingproblem-go/issues/340)
+* [Day 165](https://github.com/vaskoz/dailycodingproblem-go/issues/343)
diff --git a/day165/problem.go b/day165/problem.go
new file mode 100644
index 0000000..9e68185
--- /dev/null
+++ b/day165/problem.go
@@ -0,0 +1,18 @@
+package day165
+
+// SmallerRightCount returns the number of smaller elements
+// to the right of the position.
+// Runs in O(N^2) time.
+func SmallerRightCount(nums []int) []int {
+	result := make([]int, len(nums))
+	for i, v := range nums {
+		count := 0
+		for j := i + 1; j < len(nums); j++ {
+			if v > nums[j] {
+				count++
+			}
+		}
+		result[i] = count
+	}
+	return result
+}


Test patch:
diff --git a/day165/problem_test.go b/day165/problem_test.go
new file mode 100644
index 0000000..5e5752a
--- /dev/null
+++ b/day165/problem_test.go
@@ -0,0 +1,29 @@
+package day165
+
+import (
+	"reflect"
+	"testing"
+)
+
+var testcases = []struct {
+	nums, expected []int
+}{
+	{[]int{3, 4, 9, 6, 1}, []int{1, 1, 2, 1, 0}},
+}
+
+func TestSmallerRightCount(t *testing.T) {
+	t.Parallel()
+	for _, tc := range testcases {
+		if result := SmallerRightCount(tc.nums); !reflect.DeepEqual(result, tc.expected) {
+			t.Errorf("Expected %v got %v", tc.expected, result)
+		}
+	}
+}
+
+func BenchmarkSmallerRightCount(b *testing.B) {
+	for i := 0; i < b.N; i++ {
+		for _, tc := range testcases {
+			SmallerRightCount(tc.nums)
+		}
+	}
+}
Repository: single-spa/single-spa-layout (js)

Issue:
LayoutEngine: route matching with only trailing "/"
**Describe the bug or question**
When defining base path of  "/something" and route path of "/", the route will only match to "/something/" and not "/something". Since route does not allow empty strings as a route.

**Expected behavior**
route "/something" will match

**Screenshots and/or console output**
If applicable, add screenshots or console output to help explain your problem.

**Additional context**
Why is empty route string not allowed when according to documentation leading and trailing slashes are not needed?


Pull request:
Fix bug with trailing slashes. Resolves #64.
See #64 

Patch:
diff --git a/src/isomorphic/matchRoute.js b/src/isomorphic/matchRoute.js
index be0602a..66ade44 100644
--- a/src/isomorphic/matchRoute.js
+++ b/src/isomorphic/matchRoute.js
@@ -60,17 +60,23 @@ function recurseRoutes(location, routes) {
 }
 
 export function resolvePath(prefix, path) {
+  let result;
+
   if (prefix.substr(-1) === "/") {
     if (path[0] === "/") {
-      return prefix + path.slice(1);
+      result = prefix + path.slice(1);
     } else {
-      return prefix + path;
+      result = prefix + path;
     }
+  } else if (path[0] === "/") {
+    result = prefix + path;
   } else {
-    if (path[0] === "/") {
-      return prefix + path;
-    } else {
-      return prefix + "/" + path;
-    }
+    result = prefix + "/" + path;
   }
+
+  if (result.substr(-1) === "/") {
+    result = result.slice(0, result.length - 1);
+  }
+
+  return result;
 }


Test patch:
diff --git a/test/constructApplications.test.js b/test/constructApplications.test.js
index eba8f54..f3b173a 100644
--- a/test/constructApplications.test.js
+++ b/test/constructApplications.test.js
@@ -333,6 +333,35 @@ describe(`constructApplications`, () => {
       `);
     }
   });
+
+  // https://github.com/single-spa/single-spa-layout/issues/64
+  it(`does not require trailing slashes after base path`, () => {
+    const routes = constructRoutes({
+      mode: "history",
+      base: "/something",
+      routes: [
+        {
+          type: "route",
+          path: "/",
+          routes: [
+            {
+              type: "application",
+              name: "app1",
+            },
+          ],
+        },
+      ],
+    });
+
+    async function loadApp() {}
+
+    const applications = constructApplications({ routes, loadApp });
+    expect(applications.length).toBe(1);
+    const app1 = applications[0];
+    expect(
+      app1.activeWhen.some((fn) => fn(new URL("http://example.com/something")))
+    ).toBe(true);
+  });
 });
 
 function tick() {
Repository: getkin/kin-openapi (go)

Issue:
Support for http authentication other than Basic
The library currently only supports Basic http authentication.  Other mechanisms are in common use - especially Negotiate in enterprise settings, and browsers also support Digest auth.

IANA have a registry : https://www.iana.org/assignments/http-authschemes/http-authschemes.xhtml

.. I don't know if all of these should be added to the library or just those supported directly by browsers.

Pull request:
Support for alternate http auth mechanisms
Fixes #290

Support for negotiate and digest auth schemes that are in common use.

Patch:
diff --git a/openapi3/security_scheme.go b/openapi3/security_scheme.go
index 7e83019..8d6c7c1 100644
--- a/openapi3/security_scheme.go
+++ b/openapi3/security_scheme.go
@@ -115,7 +115,7 @@ func (ss *SecurityScheme) Validate(c context.Context) error {
 		switch scheme {
 		case "bearer":
 			hasBearerFormat = true
-		case "basic":
+		case "basic", "negotiate", "digest":
 		default:
 			return fmt.Errorf("Security scheme of type 'http' has invalid 'scheme' value '%s'", scheme)
 		}


Test patch:
diff --git a/openapi3/security_scheme_test.go b/openapi3/security_scheme_test.go
index 9edb17a..cba0b84 100644
--- a/openapi3/security_scheme_test.go
+++ b/openapi3/security_scheme_test.go
@@ -46,6 +46,26 @@ var securitySchemeExamples = []securitySchemeExample{
 `),
 		valid: true,
 	},
+	{
+		title: "Negotiate Authentication Sample",
+		raw: []byte(`
+{
+  "type": "http",
+  "scheme": "negotiate"
+}
+`),
+		valid: true,
+	},
+	{
+		title: "Unknown http Authentication Sample",
+		raw: []byte(`
+{
+  "type": "http",
+  "scheme": "notvalid"
+}
+`),
+		valid: false,
+	},
 	{
 		title: "API Key Sample",
 		raw: []byte(`