This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {%- set image_count = namespace(value=0) %} | |
| {%- set video_count = namespace(value=0) %} | |
| {%- macro render_content(content, do_vision_count, is_system_content=false) %} | |
| {%- if content is string %} | |
| {{- content }} | |
| {%- elif content is iterable and content is not mapping %} | |
| {%- for item in content %} | |
| {%- if 'image' in item or 'image_url' in item or item.type == 'image' %} | |
| {%- if is_system_content %} | |
| {{- raise_exception('System message cannot contain images.') }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- a/drivers/net/wireless/mediatek/mt76/mt7925/main.c | |
| +++ b/drivers/net/wireless/mediatek/mt76/mt7925/main.c | |
| @@ -449,12 +449,16 @@ | |
| { | |
| struct mt792x_phy *phy = &dev->phy; | |
| + WRITE_ONCE(phy->roc_abort, true); | |
| timer_delete_sync(&phy->roc_timer); | |
| cancel_work_sync(&phy->roc_work); | |
| + /* make sure roc_work didn't rearm the timer on lock contention */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Get-CameraBrightness { | |
| param( | |
| [Parameter(Mandatory)] | |
| [string]$CameraName | |
| ) | |
| $output = ffmpeg -f dshow -i video="$CameraName" -frames:v 1 -vf "signalstats,metadata=print:key=lavfi.signalstats.YAVG:file=-" -f null - 2>&1 | |
| if (($output -join "`n") -match "signalstats\.YAVG=([\d\.]+)") { | |
| return [double]$local:Matches[1] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Sharpix.Workstation; | |
| using Sharpix.Workstation.Syntax; | |
| using static Sharpix.Workstation.Syntax.Expressions; | |
| using static Sharpix.Workstation.Packages; | |
| var giteaDomain = Domain("forge.example.net"); | |
| var giteaPort = TcpPort(3000); | |
| var publicIpv6 = Ip6Address("2001:db8:100:1::1"); | |
| var trustedPeers = Ip6Pool( | |
| "2001:db8:100:2::2", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 2025-01-27 15:20:08,714 5364 [DEBUG] - XmlConfiguration is now operational | |
| 2025-01-27 15:20:08,793 5364 [DEBUG] - Adding new type 'CygwinService' for type 'IAlternativeSourceRunner' from assembly 'choco' | |
| 2025-01-27 15:20:08,793 5364 [DEBUG] - Adding new type 'CygwinService' for type 'IInstallSourceRunner' from assembly 'choco' | |
| 2025-01-27 15:20:08,793 5364 [DEBUG] - Adding new type 'PythonService' for type 'IAlternativeSourceRunner' from assembly 'choco' | |
| 2025-01-27 15:20:08,793 5364 [DEBUG] - Adding new type 'PythonService' for type 'IListSourceRunner' from assembly 'choco' | |
| 2025-01-27 15:20:08,793 5364 [DEBUG] - Adding new type 'PythonService' for type 'IInstallSourceRunner' from assembly 'choco' | |
| 2025-01-27 15:20:08,793 5364 [DEBUG] - Adding new type 'PythonService' for type 'IUninstallSourceRunner' from assembly 'choco' | |
| 2025-01-27 15:20:08,800 5364 [DEBUG] - Adding new type 'RubyGemsService' for type 'IAlternativeSourceRunner' from assembly 'choco' | |
| 2025-01-27 15:20:08,800 5364 [DEBUG] - Adding new type 'RubyG |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Obsolete("workaround for https://github.com/microsoft/vs-streamjsonrpc/issues/1084")] | |
| public sealed class StreamCloseNoExceptionWorkaround: Stream { | |
| readonly Stream wrapped; | |
| readonly ILogger log; | |
| public StreamCloseNoExceptionWorkaround(Stream wrapped, ILogger log) { | |
| this.wrapped = wrapped ?? throw new ArgumentNullException(nameof(wrapped)); | |
| this.log = log ?? throw new ArgumentNullException(nameof(log)); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Tmds.DBus.Protocol; | |
| /* USE: | |
| var response = await connection.Call( | |
| () => screenCast.CreateSessionAsync( | |
| new Dictionary<string, VariantValue> { | |
| { "handle_token", "s0" }, | |
| { "session_handle_token", "s1" }, | |
| }), log).ConfigureAwait(false); | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #r "nuget: Microsoft.AspNetCore.App, 2.2.8" | |
| using System.Net.Http; | |
| using Microsoft.AspNetCore.Builder; | |
| using Microsoft.Extensions.DependencyInjection; | |
| using Microsoft.Extensions.Logging; | |
| var builder = WebApplication.CreateBuilder(args); | |
| var app = builder.Build(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Your job is to filter RSS feed. You will get a JSON entry in TT-RSS format | |
| for an article. You should decide whether to keep it or not. | |
| Before deciding, do as much reasoning aloud as needed first. | |
| Then add a final line which should be either 'KEEP' or 'REMOVE NOW'. These words | |
| should be the only thing on that line - no other characters or whitespace allowed. | |
| Please ensure there is a new line character before the final line. | |
| Remove only the following articles: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| POST https://api.groq.com/openai/v1/chat/completions | |
| X-Broken: 1 | |
| Content-Type: application/json | |
| Authorization: Bearer XXXXXX | |
| { | |
| "model": "llama-3.1-70b-versatile", | |
| "messages": [ | |
| { | |
| "role": "system", |
NewerOlder