PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: analysis-dev/diktat (kotlin)

Issue:
CONSTANT_UPPERCASE doesn't handle number in middle name
## Describe the bug
`Warn (1:11) [CONSTANT_UPPERCASE] <val> properties from companion object or on file level mostly in all cases are constants - please use upper snake case for them: NEO4J_STARTUP_DELAY_MILLIS` in
```kotlin
const val NEO4J_STARTUP_DELAY_MILLIS = 200L
```

## Expected behavior
No warning in provided example

## Observed behavior

## Steps to Reproduce
Number in middle constant name

## Environment information
* diktat version: 1.2.3, 1.2.4.2
* build tool (maven/gradle): gradle
* how is diktat run (CLI, plugin, etc.): plugin
* kotlin version: 1.7.21
* operating system: windows
* link to a project (if your project is public):

Pull request:
### What's done:
* fixed regular expression

Closes #1572

Patch:
diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/StringCaseUtils.kt b/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/StringCaseUtils.kt
index 61878af166..982445f59d 100644
--- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/StringCaseUtils.kt
+++ b/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/StringCaseUtils.kt
@@ -40,7 +40,7 @@ fun String.isLowerCamelCase(): Boolean = this.matches("[a-z]([a-z0-9])*([A-Z][a-
  *
  * @return boolean result
  */
-fun String.isUpperSnakeCase(): Boolean = this.matches("(([A-Z]+)_*)+[A-Z0-9]*".toRegex())
+fun String.isUpperSnakeCase(): Boolean = this.matches("(([A-Z0-9]+)_*)+[A-Z0-9]*".toRegex())
 
 /**
  * checking that string looks like: lower_case_for_script_names


Test patch:
diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter1/IdentifierNamingWarnTest.kt b/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter1/IdentifierNamingWarnTest.kt
index 45cf508fae..ab32c4d1c4 100644
--- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter1/IdentifierNamingWarnTest.kt
+++ b/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter1/IdentifierNamingWarnTest.kt
@@ -135,6 +135,16 @@ class IdentifierNamingWarnTest : LintTestBase(::IdentifierNaming) {
         )
     }
 
+    @Test
+    @Tag(WarningNames.CONSTANT_UPPERCASE)
+    fun `number in middle name`() {
+        lintMethod(
+            """
+                    const val NE04J_STARTUP_DELAY_MILLIS = 200L
+            """.trimIndent()
+        )
+    }
+
     @Test
     @Tags(
         Tag(WarningNames.CLASS_NAME_INCORRECT),
Repository: materialsproject/custodian (python)

Issue:
Use of ADDGRID in VASP Custodian should be investigated
As noted in the [VASP manual](https://www.vasp.at/wiki/index.php/ADDGRID), when using ADDGRID, the VASP team "recommend[s] performing careful tests, on whether ADDGRID works as desired; please do not use this tag as default in all your calculations!" Empirically, I have found that `AECCAR` files oftentimes are not valid when `ADDGRID` is set to True, which can influence partial atomic charge calculations (and related methods like bond order analyses) downstream. This begs the question of whether `ADDGRID` should be used at all in Custodian. This should be investigated and reconsidered. Personally, I am currently leaning towards removing it altogether from Custodian. It's not used in many places as-is.

Pull request:
VASP Handler: Do not set `ADDGRID` to True
This closes #226. In short, the VASP manual strongly advises caution against using the `ADDGRID` command, and in my experience, I have seen that it produces invalid `AECCAR` files. It should not be set in Custodian as a rule.

Patch:
diff --git a/custodian/vasp/handlers.py b/custodian/vasp/handlers.py
index 0edaeefa..496233e5 100644
--- a/custodian/vasp/handlers.py
+++ b/custodian/vasp/handlers.py
@@ -898,11 +898,8 @@ class DriftErrorHandler(ErrorHandler):
         # Move CONTCAR to POSCAR
         actions.append({"file": "CONTCAR", "action": {"_file_copy": {"dest": "POSCAR"}}})
 
-        # First try adding ADDGRID
-        if not incar.get("ADDGRID", False):
-            actions.append({"dict": "INCAR", "action": {"_set": {"ADDGRID": True}}})
-        # Otherwise set PREC to High so ENAUG can be used to control Augmentation Grid Size
-        elif incar.get("PREC", "Accurate").lower() != "high":
+        # Set PREC to High so ENAUG can be used to control Augmentation Grid Size
+        if incar.get("PREC", "Accurate").lower() != "high":
             actions.append({"dict": "INCAR", "action": {"_set": {"PREC": "High"}}})
             actions.append(
                 {


Test patch:
diff --git a/custodian/vasp/tests/test_handlers.py b/custodian/vasp/tests/test_handlers.py
index 3e3ce360..4f7eb912 100644
--- a/custodian/vasp/tests/test_handlers.py
+++ b/custodian/vasp/tests/test_handlers.py
@@ -1179,10 +1179,6 @@ class DriftErrorHandlerTest(unittest.TestCase):
 
         h = DriftErrorHandler(max_drift=0.0001, enaug_multiply=2)
         h.check()
-        h.correct()
-        incar = Incar.from_file("INCAR")
-        self.assertTrue(incar.get("ADDGRID", False))
-
         h.correct()
         incar = Incar.from_file("INCAR")
         self.assertEqual(incar.get("PREC"), "High")
Repository: vaskoz/dailycodingproblem-go (go)

Issue:
Day 275
Good morning! Here's your coding interview problem for today.

This problem was asked by Epic.

The "look and say" sequence is defined as follows: beginning with the term 1, each subsequent term visually describes the digits appearing in the previous term. The first few terms are as follows:
```
1
11
21
1211
111221
```
As an example, the fourth term is `1211`, since the third term consists of one `2` and one `1`.

Given an integer `N`, print the Nth term of this sequence.

Pull request:
Day275
Resolves #560.

Patch:
diff --git a/README.md b/README.md
index e24f75b..ea8ce27 100644
--- a/README.md
+++ b/README.md
@@ -281,6 +281,7 @@ problems from
 * [Day 271](https://github.com/vaskoz/dailycodingproblem-go/issues/553)
 * [Day 272](https://github.com/vaskoz/dailycodingproblem-go/issues/555)
 * [Day 273](https://github.com/vaskoz/dailycodingproblem-go/issues/556)
+* [Day 275](https://github.com/vaskoz/dailycodingproblem-go/issues/560)
 * [Day 277](https://github.com/vaskoz/dailycodingproblem-go/issues/563)
 * [Day 278](https://github.com/vaskoz/dailycodingproblem-go/issues/565)
 * [Day 279](https://github.com/vaskoz/dailycodingproblem-go/issues/566)
diff --git a/day275/problem.go b/day275/problem.go
new file mode 100644
index 0000000..97d3b75
--- /dev/null
+++ b/day275/problem.go
@@ -0,0 +1,34 @@
+package day275
+
+import (
+	"fmt"
+	"strings"
+)
+
+func LookAndSay(n int) string {
+	if n < 1 {
+		panic("look and say number must be 1 or greater")
+	}
+	start := "1"
+	for i := 1; i < n; i++ {
+		var parts []string
+		var c rune
+		count := 0
+		for i, r := range start {
+			switch {
+			case i == 0:
+				c = r
+				count = 1
+			case c != r:
+				parts = append(parts, fmt.Sprintf("%d%s", count, string(c)))
+				c = r
+				count = 1
+			default:
+				count++
+			}
+		}
+		parts = append(parts, fmt.Sprintf("%d%s", count, string(c)))
+		start = strings.Join(parts, "")
+	}
+	return start
+}


Test patch:
diff --git a/day275/problem_test.go b/day275/problem_test.go
new file mode 100644
index 0000000..a24460b
--- /dev/null
+++ b/day275/problem_test.go
@@ -0,0 +1,45 @@
+package day275
+
+import "testing"
+
+// nolint
+var testcases = []struct {
+	n      int
+	result string
+}{
+	{1, "1"},
+	{2, "11"},
+	{3, "21"},
+	{4, "1211"},
+	{5, "111221"},
+	{6, "312211"},
+	{7, "13112221"},
+	{8, "1113213211"},
+}
+
+func TestLookAndSay(t *testing.T) {
+	t.Parallel()
+	for _, tc := range testcases {
+		if result := LookAndSay(tc.n); result != tc.result {
+			t.Errorf("Expected %v, got %v", tc.result, result)
+		}
+	}
+}
+
+func TestLookAndSayBadInput(t *testing.T) {
+	t.Parallel()
+	defer func() {
+		if err := recover(); err == nil {
+			t.Errorf("Expected a panic for input <1")
+		}
+	}()
+	LookAndSay(0)
+}
+
+func BenchmarkLookAndSay(b *testing.B) {
+	for i := 0; i < b.N; i++ {
+		for _, tc := range testcases {
+			LookAndSay(tc.n)
+		}
+	}
+}