helloadhavan/github_issues huggingface dataset:
Repository: electron/electron
Pull request: test: add tests dbus notification images

#### Description of Change

Provide a `NativeImage` icon in the notification tests and then inspect the DBus message payload's `image_data` hint to see if it's correct. This adds test coverage for `LibnotifyNotification::Show()` and for `GdkPixbufFromSkBitmap()`.

#### Checklist

- [x] PR description included and stakeholders cc'd
- [x] `npm test` passes
- [x] tests are [changed or added](https://github.com/electron/electron/blob/main/docs/development/testing.md)
- [x] [PR release notes](https://github.com/electron/clerk/blob/main/README.md) describe the change in a way relevant to app developers, and are [capitalized, punctuated, and past tense](https://github.com/electron/clerk/blob/main/README.md#examples).

#### Release Notes

Notes: none.

Changed files:
filename: spec/api-notification-dbus-spec.ts
patch: @@ -9,8 +9,12 @@
 import { expect } from 'chai';
 import * as dbus from 'dbus-native';
 import { app } from 'electron/main';
+import { nativeImage } from 'electron/common';
 import { ifdescribe } from './lib/spec-helpers';
 import { promisify } from 'node:util';
+import * as path from 'node:path';
+
+const fixturesPath = path.join(__dirname, 'fixtures');
 
 const skip = process.platform !== 'linux' ||
              process.arch === 'ia32' ||
@@ -92,6 +96,7 @@ ifdescribe(!skip)('Notification module (dbus)', () => {
         title: 'title',
         subtitle: 'subtitle',
         body: 'body',
+        icon: nativeImage.createFromPath(path.join(fixturesPath, 'assets', 'notification_icon.png')),
         replyPlaceholder: 'replyPlaceholder',
         sound: 'sound',
         closeButtonText: 'closeButtonText'
@@ -117,6 +122,7 @@ ifdescribe(!skip)('Notification module (dbus)', () => {
         actions: [],
         hints: {
           append: 'true',
+          image_data: [3, 3, 12, true, 8, 4, Buffer.from([255, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 0, 76, 255, 0, 255, 0, 0, 0, 255, 0, 0, 0, 0, 0, 38, 255, 255, 0, 0, 0, 255, 0, 0, 0, 0])],
           'desktop-entry': appName,
           urgency: 1
         }
Repository: ggml-org/llama.cpp
Pull request: add easy-llama Python bindings to README

The Python bindings `llama-cpp-python` have become less frequently updated over time, my project `easy-llama` is more up-to-date. This PR adds `easy-llama` to the list of bindings in the README. It does not remove `llama-cpp-python`.

Changed files:
filename: README.md
patch: @@ -130,6 +130,7 @@ Instructions for adding support for new models: [HOWTO-add-model.md](docs/develo
 <details>
 <summary>Bindings</summary>
 
+- Python: [ddh0/easy-llama](https://github.com/ddh0/easy-llama)
 - Python: [abetlen/llama-cpp-python](https://github.com/abetlen/llama-cpp-python)
 - Go: [go-skynet/go-llama.cpp](https://github.com/go-skynet/go-llama.cpp)
 - Node.js: [withcatai/node-llama-cpp](https://github.com/withcatai/node-llama-cpp)
Repository: electron/electron
Pull request: perf: build g_dgettext domain name at compile time

Backport of #43960

See that PR for details.


Notes: none.

Changed files:
filename: shell/browser/ui/gtk_util.cc
patch: @@ -8,31 +8,25 @@
 #include <gtk/gtk.h>
 #include <stdint.h>
 
-#include <string>
-#include <vector>
-
-#include "base/no_destructor.h"
-#include "base/strings/string_number_conversions.h"
+#include "base/macros/remove_parens.h"
+#include "base/strings/stringize_macros.h"
 #include "electron/electron_gtk_stubs.h"
 #include "third_party/skia/include/core/SkBitmap.h"
 #include "third_party/skia/include/core/SkColor.h"
 #include "third_party/skia/include/core/SkUnPreMultiply.h"
-#include "ui/gtk/gtk_compat.h"  // nogncheck
 
 // The following utilities are pulled from
 // https://source.chromium.org/chromium/chromium/src/+/main:ui/gtk/select_file_dialog_linux_gtk.cc;l=44-75;drc=a03ba4ca94f75531207c3ea832d6a605cde77394
 namespace gtk_util {
 
 namespace {
 
-const char* GettextPackage() {
-  static base::NoDestructor<std::string> gettext_package(
-      "gtk" + base::NumberToString(gtk::GtkVersion().components()[0]) + "0");
-  return gettext_package->c_str();
-}
-
 const char* GtkGettext(const char* str) {
-  return g_dgettext(GettextPackage(), str);
+  // ex: "gtk30". GTK_MAJOR_VERSION is #defined as an int in parenthesis,
+  // like (3), so use base macros to remove parenthesis and stringize it
+  static const char kGettextDomain[] =
+      "gtk" STRINGIZE(BASE_REMOVE_PARENS(GTK_MAJOR_VERSION)) "0";
+  return g_dgettext(kGettextDomain, str);
 }
 
 }  // namespace
Repository: ggml-org/llama.cpp
Pull request: parallel : fix n_junk == 0

fix https://github.com/ggml-org/llama.cpp/pull/13927#discussion_r2118199547

Changed files:
filename: examples/parallel/parallel.cpp
patch: @@ -158,7 +158,7 @@ int main(int argc, char ** argv) {
     common_params params;
 
     params.n_predict = 128;
-    params.n_junk = 0;
+    params.n_junk = 1;
 
     if (!common_params_parse(argc, argv, params, LLAMA_EXAMPLE_PARALLEL)) {
         return 1;
@@ -182,7 +182,7 @@ int main(int argc, char ** argv) {
     const bool is_sp_shared = params.is_pp_shared;
 
     // extra text to insert in each client's prompt in order to make it larger
-    const int32_t n_junk = params.n_junk;
+    const int32_t n_junk = std::max(1, params.n_junk);
 
     // init llama.cpp
     llama_backend_init();
Repository: electron/electron
Pull request: perf: build g_dgettext domain name at compile time

#### Description of Change

When using `g_dgettext(domain, str)` calls to get GTK strings, build the domain string at compile time rather than runtime. Nothing world-changing, but a nice cleanup:

- faster
- one less instance of `base::NoDestructor`
- one less instance of `// nogncheck`
- removes the need for `gtk::GtkVersion()` and `base::NumberToString()`

#### Checklist

- [x] PR description included and stakeholders cc'd
- [x] `npm test` passes
- [x] [PR release notes](https://github.com/electron/clerk/blob/main/README.md) describe the change in a way relevant to app developers, and are [capitalized, punctuated, and past tense](https://github.com/electron/clerk/blob/main/README.md#examples).

#### Release Notes

Notes: none.

Changed files:
filename: shell/browser/ui/gtk_util.cc
patch: @@ -8,31 +8,25 @@
 #include <gtk/gtk.h>
 #include <stdint.h>
 
-#include <string>
-#include <vector>
-
-#include "base/no_destructor.h"
-#include "base/strings/string_number_conversions.h"
+#include "base/macros/remove_parens.h"
+#include "base/strings/stringize_macros.h"
 #include "electron/electron_gtk_stubs.h"
 #include "third_party/skia/include/core/SkBitmap.h"
 #include "third_party/skia/include/core/SkColor.h"
 #include "third_party/skia/include/core/SkUnPreMultiply.h"
-#include "ui/gtk/gtk_compat.h"  // nogncheck
 
 // The following utilities are pulled from
 // https://source.chromium.org/chromium/chromium/src/+/main:ui/gtk/select_file_dialog_linux_gtk.cc;l=44-75;drc=a03ba4ca94f75531207c3ea832d6a605cde77394
 namespace gtk_util {
 
 namespace {
 
-const char* GettextPackage() {
-  static base::NoDestructor<std::string> gettext_package(
-      "gtk" + base::NumberToString(gtk::GtkVersion().components()[0]) + "0");
-  return gettext_package->c_str();
-}
-
 const char* GtkGettext(const char* str) {
-  return g_dgettext(GettextPackage(), str);
+  // ex: "gtk30". GTK_MAJOR_VERSION is #defined as an int in parenthesis,
+  // like (3), so use base macros to remove parenthesis and stringize it
+  static const char kGettextDomain[] =
+      "gtk" STRINGIZE(BASE_REMOVE_PARENS(GTK_MAJOR_VERSION)) "0";
+  return g_dgettext(kGettextDomain, str);
 }
 
 }  // namespace
Repository: nodejs/node
Pull request: meta: assign CODEOWNERS for /deps/ncrypto/*

AS per the title, noticed in #55425 where the team was not pinged

Changed files:
filename: .github/CODEOWNERS
patch: @@ -68,6 +68,7 @@
 /lib/tls.js @nodejs/crypto @nodejs/net
 /src/crypto/* @nodejs/crypto
 /src/node_crypto* @nodejs/crypto
+/deps/ncrypto/* @nodejs/crypto
 
 # http
Repository: electron/electron
Pull request: fix: replace deprecated libnotify API calls

Backport of #43962

See that PR for details.


Notes: none.

Changed files:
filename: BUILD.gn
patch: @@ -74,7 +74,6 @@ if (is_linux) {
       "notify_notification_set_image_from_pixbuf",
       "notify_notification_set_timeout",
       "notify_notification_set_urgency",
-      "notify_notification_set_hint_string",
       "notify_notification_set_hint",
       "notify_notification_show",
       "notify_notification_close",

filename: shell/browser/notifications/linux/libnotify_notification.cc
patch: @@ -131,19 +131,20 @@ void LibnotifyNotification::Show(const NotificationOptions& options) {
   // Always try to append notifications.
   // Unique tags can be used to prevent this.
   if (HasCapability("append")) {
-    libnotify_loader_.notify_notification_set_hint_string(notification_,
-                                                          "append", "true");
+    libnotify_loader_.notify_notification_set_hint(
+        notification_, "append", g_variant_new_string("true"));
   } else if (HasCapability("x-canonical-append")) {
-    libnotify_loader_.notify_notification_set_hint_string(
-        notification_, "x-canonical-append", "true");
+    libnotify_loader_.notify_notification_set_hint(
+        notification_, "x-canonical-append", g_variant_new_string("true"));
   }
 
   // Send the desktop name to identify the application
   // The desktop-entry is the part before the .desktop
   std::string desktop_id = platform_util::GetXdgAppId();
   if (!desktop_id.empty()) {
-    libnotify_loader_.notify_notification_set_hint_string(
-        notification_, "desktop-entry", desktop_id.c_str());
+    libnotify_loader_.notify_notification_set_hint(
+        notification_, "desktop-entry",
+        g_variant_new_string(desktop_id.c_str()));
   }
 
   libnotify_loader_.notify_notification_set_hint(
Repository: denoland/deno
Pull request: fix(dts): stabilize `fetch` declaration for use with `Deno.HttpClient`

This commit stabilizes the `fetch` function declaration for use with `Deno.HttpClient` and moves it from `lib.deno.unstable.d.ts` to `lib.deno.shared_globals.d.ts`.

`Deno.HttpClient` was stabilized in #25569, but the associated override declaration for `fetch` is still marked as experimental. This should also be stabilized now and moved to a different d.ts file.


Changed files:
filename: cli/tsc/dts/lib.deno.shared_globals.d.ts
patch: @@ -13,6 +13,7 @@
 /// <reference lib="deno.fetch" />
 /// <reference lib="deno.websocket" />
 /// <reference lib="deno.crypto" />
+/// <reference lib="deno.ns" />
 
 /** @category WASM */
 declare namespace WebAssembly {
@@ -740,3 +741,15 @@ declare interface ErrorConstructor {
   // TODO(nayeemrmn): Support `Error.prepareStackTrace()`. We currently use this
   // internally in a way that makes it unavailable for users.
 }
+
+/** The [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)
+ * which also supports setting a {@linkcode Deno.HttpClient} which provides a
+ * way to connect via proxies and use custom TLS certificates.
+ *
+ * @tags allow-net, allow-read
+ * @category Fetch
+ */
+declare function fetch(
+  input: Request | URL | string,
+  init?: RequestInit & { client: Deno.HttpClient },
+): Promise<Response>;

filename: cli/tsc/dts/lib.deno.unstable.d.ts
patch: @@ -1216,21 +1216,6 @@ declare namespace Deno {
   }
 }
 
-/** **UNSTABLE**: New API, yet to be vetted.
- *
- * The [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)
- * which also supports setting a {@linkcode Deno.HttpClient} which provides a
- * way to connect via proxies and use custom TLS certificates.
- *
- * @tags allow-net, allow-read
- * @category Fetch
- * @experimental
- */
-declare function fetch(
-  input: Request | URL | string,
-  init?: RequestInit & { client: Deno.HttpClient },
-): Promise<Response>;
-
 /** **UNSTABLE**: New API, yet to be vetted.
  *
  * @category Workers
Repository: electron/electron
Pull request: fix: replace deprecated libnotify API calls

#### Description of Change

`notify_notification_set_hint_string()` is deprecated, so let's use `notify_notification_set_hint()` instead.

Xref: https://github.com/GNOME/libnotify/commit/2fe1748295c97cd8251e1711e0f54c4d65633d48

#### Checklist

- [x] PR description included and stakeholders cc'd
- [x] `npm test` passes
- [x] [PR release notes](https://github.com/electron/clerk/blob/main/README.md) describe the change in a way relevant to app developers, and are [capitalized, punctuated, and past tense](https://github.com/electron/clerk/blob/main/README.md#examples).

#### Release Notes

Notes: none.

Changed files:
filename: BUILD.gn
patch: @@ -74,7 +74,6 @@ if (is_linux) {
       "notify_notification_set_image_from_pixbuf",
       "notify_notification_set_timeout",
       "notify_notification_set_urgency",
-      "notify_notification_set_hint_string",
       "notify_notification_set_hint",
       "notify_notification_show",
       "notify_notification_close",

filename: shell/browser/notifications/linux/libnotify_notification.cc
patch: @@ -131,19 +131,20 @@ void LibnotifyNotification::Show(const NotificationOptions& options) {
   // Always try to append notifications.
   // Unique tags can be used to prevent this.
   if (HasCapability("append")) {
-    libnotify_loader_.notify_notification_set_hint_string(notification_,
-                                                          "append", "true");
+    libnotify_loader_.notify_notification_set_hint(
+        notification_, "append", g_variant_new_string("true"));
   } else if (HasCapability("x-canonical-append")) {
-    libnotify_loader_.notify_notification_set_hint_string(
-        notification_, "x-canonical-append", "true");
+    libnotify_loader_.notify_notification_set_hint(
+        notification_, "x-canonical-append", g_variant_new_string("true"));
   }
 
   // Send the desktop name to identify the application
   // The desktop-entry is the part before the .desktop
   std::string desktop_id = platform_util::GetXdgAppId();
   if (!desktop_id.empty()) {
-    libnotify_loader_.notify_notification_set_hint_string(
-        notification_, "desktop-entry", desktop_id.c_str());
+    libnotify_loader_.notify_notification_set_hint(
+        notification_, "desktop-entry",
+        g_variant_new_string(desktop_id.c_str()));
   }
 
   libnotify_loader_.notify_notification_set_hint(
Repository: facebook/react
Pull request: Bug fix for "<App />" vs. "<Counter />"

## Summary

I saw a small bug in the initial example on the top of the README.md

## How did you test this change?

N/A, it's documentation to update to a correct JSX component in the first example people see when reading the latest documentation example.

Changed files:
filename: packages/react/README.md
patch: @@ -25,7 +25,7 @@ function Counter() {
 }
 
 const root = createRoot(document.getElementById('root'));
-root.render(<App />);
+root.render(<Counter />);
 ```
 
 ## Documentation
Repository: electron/electron
Pull request: fix: replace deprecated libnotify API calls

Backport of #43962

See that PR for details.


Notes: none.

Changed files:
filename: BUILD.gn
patch: @@ -75,7 +75,6 @@ if (is_linux) {
       "notify_notification_set_image_from_pixbuf",
       "notify_notification_set_timeout",
       "notify_notification_set_urgency",
-      "notify_notification_set_hint_string",
       "notify_notification_set_hint",
       "notify_notification_show",
       "notify_notification_close",

filename: shell/browser/notifications/linux/libnotify_notification.cc
patch: @@ -131,19 +131,20 @@ void LibnotifyNotification::Show(const NotificationOptions& options) {
   // Always try to append notifications.
   // Unique tags can be used to prevent this.
   if (HasCapability("append")) {
-    libnotify_loader_.notify_notification_set_hint_string(notification_,
-                                                          "append", "true");
+    libnotify_loader_.notify_notification_set_hint(
+        notification_, "append", g_variant_new_string("true"));
   } else if (HasCapability("x-canonical-append")) {
-    libnotify_loader_.notify_notification_set_hint_string(
-        notification_, "x-canonical-append", "true");
+    libnotify_loader_.notify_notification_set_hint(
+        notification_, "x-canonical-append", g_variant_new_string("true"));
   }
 
   // Send the desktop name to identify the application
   // The desktop-entry is the part before the .desktop
   std::string desktop_id = platform_util::GetXdgAppId();
   if (!desktop_id.empty()) {
-    libnotify_loader_.notify_notification_set_hint_string(
-        notification_, "desktop-entry", desktop_id.c_str());
+    libnotify_loader_.notify_notification_set_hint(
+        notification_, "desktop-entry",
+        g_variant_new_string(desktop_id.c_str()));
   }
 
   libnotify_loader_.notify_notification_set_hint(
Repository: denoland/deno
Pull request: feat: update warning message for --allow-run with no list

Ref https://github.com/denoland/deno/pull/25215#discussion_r1762064605

Changed files:
filename: cli/args/mod.rs
patch: @@ -1705,7 +1705,7 @@ fn warn_insecure_allow_run_flags(flags: &Flags) {
   // discourage using --allow-run without an allow list
   if allow_run_list.is_empty() {
     log::warn!(
-      "{} --allow-run can be trivially exploited. Prefer specifying an allow list (https://docs.deno.com/runtime/fundamentals/security/#running-subprocesses)",
+      "{} --allow-run without an allow list is susceptible to exploits. Prefer specifying an allow list (https://docs.deno.com/runtime/fundamentals/security/#running-subprocesses)",
       colors::yellow("Warning")
     );
   }

filename: tests/specs/permission/deny_run_binary_absolute_path/main.out
patch: @@ -1,4 +1,4 @@
-Warning --allow-run can be trivially exploited. Prefer specifying an allow list (https://docs.deno.com/runtime/fundamentals/security/#running-subprocesses)
+Warning --allow-run without an allow list is susceptible to exploits. Prefer specifying an allow list (https://docs.deno.com/runtime/fundamentals/security/#running-subprocesses)
 NotCapable: Requires run access to "deno", run again with the --allow-run flag
     at [WILDCARD] {
   name: "NotCapable"

filename: tests/specs/run/allow_run_insecure_warnings/no_allow_list.out
patch: @@ -1 +1 @@
-Warning --allow-run can be trivially exploited. Prefer specifying an allow list (https://docs.deno.com/runtime/fundamentals/security/#running-subprocesses)
+Warning --allow-run without an allow list is susceptible to exploits. Prefer specifying an allow list (https://docs.deno.com/runtime/fundamentals/security/#running-subprocesses)

filename: tests/testdata/run/deny_some_permission_args.out
patch: @@ -1,4 +1,4 @@
-Warning --allow-run can be trivially exploited. Prefer specifying an allow list (https://docs.deno.com/runtime/fundamentals/security/#running-subprocesses)
+Warning --allow-run without an allow list is susceptible to exploits. Prefer specifying an allow list (https://docs.deno.com/runtime/fundamentals/security/#running-subprocesses)
 PermissionStatus { state: "granted", onchange: null, partial: true }
 PermissionStatus { state: "denied", onchange: null }
 PermissionStatus { state: "granted", onchange: null }
Repository: ggml-org/llama.cpp
Pull request: parallel : increase the variability of the prompt lengths

Now the prompts have randomly between `[0, n_junk)` dummy questions before the actual question.

Changed files:
filename: examples/parallel/README.md
patch: @@ -4,7 +4,7 @@ Simplified simulation of serving incoming requests in parallel
 
 ## Example
 
-Generate 128 client requests (`-ns 128`), simulating 8 concurrent clients (`-np 8`). The system prompt is shared (`-pps`), meaning that it is computed once at the start. The client requests consist of 10 junk questions (`-j 10`) followed by the actual question.
+Generate 128 client requests (`-ns 128`), simulating 8 concurrent clients (`-np 8`). The system prompt is shared (`-pps`), meaning that it is computed once at the start. The client requests consist of up to 10 junk questions (`--junk 10`) followed by the actual question.
 
 ```bash
 llama-parallel -m model.gguf -np 8 -ns 128 --top-k 1 -pps --junk 10 -c 16384

filename: examples/parallel/parallel.cpp
patch: @@ -315,7 +315,10 @@ int main(int argc, char ** argv) {
                     } else {
                         client.prompt += k_system;
                     }
-                    for (int i = 0; i < n_junk; ++i) {
+
+                    const int n_junk_cur = rand() % n_junk;
+
+                    for (int i = 0; i < n_junk_cur; ++i) {
                         const int r = rand() % k_questions.size();
                         client.prompt += "User:\n" + k_questions[r] + "\nAssistant:\n " + k_answers[r] + "\n";
                     }
@@ -340,7 +343,7 @@ int main(int argc, char ** argv) {
                     client.n_decoded = 0;
                     client.i_batch   = batch.n_tokens - 1;
 
-                    LOG_INF("\033[31mClient %3d, seq %4d, started decoding ...\033[0m\n", client.id, client.seq_id);
+                    LOG_INF("\033[31mClient %3d, seq %4d, junk = %4d, started decoding ...\033[0m\n", client.id, client.seq_id, n_junk_cur);
 
                     g_seq_id += 1;
Repository: vercel/next.js
Pull request: Reference the workUnitStore when determining bailout to CSR

When useSearchParams is determining if it should bail out to client side rendering it currently consults the worksStore. This is not semantically correct since the workStore does not represent a particular render. This change updates it to reference the workUnitStore where we can correctly identify what type of render we are within

Changed files:
filename: packages/next/src/client/components/bailout-to-client-rendering.ts
patch: @@ -1,10 +1,21 @@
 import { BailoutToCSRError } from '../../shared/lib/lazy-dynamic/bailout-to-csr'
 import { workAsyncStorage } from '../../server/app-render/work-async-storage.external'
+import { workUnitAsyncStorage } from '../../server/app-render/work-unit-async-storage.external'
 
 export function bailoutToClientRendering(reason: string): void | never {
   const workStore = workAsyncStorage.getStore()
 
   if (workStore?.forceStatic) return
 
-  if (workStore?.isStaticGeneration) throw new BailoutToCSRError(reason)
+  const workUnitStore = workUnitAsyncStorage.getStore()
+
+  if (workUnitStore) {
+    switch (workUnitStore.type) {
+      case 'prerender':
+      case 'prerender-ppr':
+      case 'prerender-legacy':
+        throw new BailoutToCSRError(reason)
+      default:
+    }
+  }
 }