Datasets:
repo stringclasses 183
values | ref stringlengths 40 40 | path stringlengths 8 198 | prompt stringlengths 0 24.6k | suffix stringlengths 0 24.5k | canonical_solution stringlengths 30 18.1k | lang stringclasses 12
values | timestamp timestamp[us]date 2019-12-19 23:00:04 2025-03-02 18:12:33 |
|---|---|---|---|---|---|---|---|
2dust/v2rayN | 79a0538ca0ea952ff7b14b368e9bbabf7928019c | v2rayN/ServiceLib/Global.cs | namespace ServiceLib
{
public class Global
{
#region const
public const string AppName = "v2rayN";
public const string GithubUrl = "https://github.com";
public const string GithubApiUrl = "https://api.github.com/repos";
public const string GeoUrl = "https://github.com/Lo... |
#endregion const
}
}
| public static readonly Dictionary<ECoreType, string> CoreUrls = new()
{
{ ECoreType.v2fly, "v2fly/v2ray-core" },
{ ECoreType.v2fly_v5, "v2fly/v2ray-core" },
{ ECoreType.Xray, "XTLS/Xray-core" },
{ ECoreType.sing_box, "SagerNet/sing-box" },
{ ECoreType.... | csharp | 2025-02-03T12:19:20 |
2dust/v2rayN | e6b27d17e40ad392d33bfda4ff5cd926bbea54a5 | v2rayN/ServiceLib/Global.cs | namespace ServiceLib
{
public class Global
{
#region const
public const string AppName = "v2rayN";
public const string GithubUrl = "https://github.com";
public const string GithubApiUrl = "https://api.github.com/repos";
public const string V2flyCoreUrl = "https://github.... |
public const string SingboxRulesetUrl = @"https://raw.githubusercontent.com/2dust/sing-box-rules/rule-set-{0}/{1}.srs";
public const string IPAPIUrl = "https://api.ip.sb/geoip";
public const string PromotionUrl = @"aHR0cHM6Ly85LjIzNDQ1Ni54eXovYWJjLmh0bWw=";
public const string ConfigFi... | public const string OvertlsCoreUrl = "https://github.com/ShadowsocksR-Live/overtls/releases"; | csharp | 2025-02-03T07:43:26 |
2dust/v2rayN | e6b27d17e40ad392d33bfda4ff5cd926bbea54a5 | v2rayN/ServiceLib/Handler/CoreInfoHandler.cs | namespace ServiceLib.Handler
{
public sealed class CoreInfoHandler
{
private static readonly Lazy<CoreInfoHandler> _instance = new(() => new());
private List<CoreInfo>? _coreInfo;
public static CoreInfoHandler Instance => _instance.Value;
public CoreInfoHandler()
{
... |
}
];
}
private string PortableMode()
{
return $" -d {Utils.GetBinPath("").AppendQuotes()}";
}
}
}
| },
new CoreInfo
{
CoreType = ECoreType.overtls,
CoreExes = [ "overtls-bin", "overtls"],
Arguments = "-r client -c {0}",
Url = Global.OvertlsCoreUrl,
AbsolutePath = false, | csharp | 2025-02-03T07:43:26 |
2dust/v2rayN | 2a0012824abb0dc5f2cb893ad510a01b9cd9d703 | v2rayN/ServiceLib/Global.cs | namespace ServiceLib
{
public class Global
{
#region const
public const string AppName = "v2rayN";
public const string GithubUrl = "https://github.com";
public const string GithubApiUrl = "https://api.github.com/repos";
public const string V2flyCoreUrl = "https://github.... |
public const string SingboxRulesetUrl = @"https://raw.githubusercontent.com/2dust/sing-box-rules/rule-set-{0}/{1}.srs";
public const string IPAPIUrl = "https://api.ip.sb/geoip";
public const string PromotionUrl = @"aHR0cHM6Ly85LjIzNDQ1Ni54eXovYWJjLmh0bWw=";
public const string ConfigFi... | public const string BrookCoreUrl = "https://github.com/txthinking/brook/releases"; | csharp | 2025-02-03T07:06:21 |
2dust/v2rayN | b2feaf3ba986863ce337b1de8f0731a7ca27c791 | v2rayN/ServiceLib/Handler/AutoStartupHandler.cs | using System.Diagnostics;
using System.Security.Principal;
using System.Text.RegularExpressions;
namespace ServiceLib.Handler
{
public static class AutoStartupHandler
{
private static readonly string _tag = "AutoStartupHandler";
public static async Task<bool> UpdateTask(Config config)
... |
}
}
| #region macOS
private static async Task ClearTaskOSX()
{
try
{
var launchAgentPath = GetLaunchAgentPathMacOS();
if (File.Exists(launchAgentPath))
{
var args = new[] { "-c", $"launchctl unload -w \"{launchAgentPath}\"" };
await Utils.... | csharp | 2025-01-30T05:24:01 |
2dust/v2rayN | c0f8b6b84ca3920992b0f310d4f51538f52a83c0 | v2rayN/v2rayN.Desktop/Views/MainWindow.axaml.cs | using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Controls.Notifications;
using Avalonia.Input;
using Avalonia.Interactivity;
using Avalonia.ReactiveUI;
using Avalonia.Threading;
using DialogHostAvalonia;
using MsBox.Avalonia.Enums;
using ReactiveUI;
using Splat;
usi... |
this.Hide();
}
else
{
this.WindowState = WindowState.Minimized;
}
}
_config.UiItem.ShowInTaskbar = bl;
}
private void RestoreUI()
{
if (_config.UiItem.MainWidth > 0 && _config.UiItem.MainHeight > 0)... | foreach (var ownedWindow in this.OwnedWindows)
{
ownedWindow.Close();
} | csharp | 2025-01-30T02:12:59 |
2dust/v2rayN | 54fe669d89fc4c347cbc52fea95bb3a9114a3451 | v2rayN/ServiceLib/Handler/CoreHandler.cs | using System.Diagnostics;
using System.Text;
namespace ServiceLib.Handler
{
/// <summary>
/// Core process processing class
/// </summary>
public class CoreHandler
{
private static readonly Lazy<CoreHandler> _instance = new(() => new());
public static CoreHandler Instance => _insta... |
if (Utils.IsNonWindows())
{
var coreInfo = CoreInfoHandler.Instance.GetCoreInfo();
foreach (var it in coreInfo)
{
if (it.CoreType == ECoreType.v2rayN)
{
if (Utils.UpgradeAppExists(ou... | //Copy the bin folder to the storage location (for init)
if (Environment.GetEnvironmentVariable(Global.LocalAppData) == "1")
{
var fromPath = Utils.GetBaseDirectory("bin");
var toPath = Utils.GetBinPath("");
if (fromPath != toPath)
... | csharp | 2025-01-18T08:58:44 |
2dust/v2rayN | cf1a8599eb08efb32b3d984a5c33378853e04fd4 | v2rayN/AmazTool/UpgradeApp.cs | using System.Diagnostics;
using System.IO.Compression;
using System.Text;
namespace AmazTool
{
internal class UpgradeApp
{
public static void Upgrade(string fileName)
{
Console.WriteLine($"{Resx.Resource.StartUnzipping}\n{fileName}");
Utils.Waiting(5);
if ... |
entry.ExtractToFile(entryOutputPath, true);
Console.WriteLine(entryOutputPath);
}
catch (Exception ex)
{
sb.Append(ex.StackTrace);
}
}
}
... | //In the bin folder, if the file already exists, it will be skipped
if (fullName.StartsWith("bin") && File.Exists(entryOutputPath))
{
continue;
} | csharp | 2025-01-17T02:27:29 |
2dust/v2rayN | cf1a8599eb08efb32b3d984a5c33378853e04fd4 | v2rayN/AmazTool/Utils.cs | using System.Diagnostics;
namespace AmazTool
{
internal class Utils
{
public static string GetExePath()
{
return Environment.ProcessPath ?? Process.GetCurrentProcess().MainModule?.FileName ?? string.Empty;
}
public static string StartupPath()
{
... |
}
} | public static void Waiting(int second)
{
for (var i = second; i > 0; i--)
{
Console.WriteLine(i);
Thread.Sleep(1000);
}
} | csharp | 2025-01-17T02:27:29 |
2dust/v2rayN | de1132c2df5422a16d454be0e49007be8a9c2894 | v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml.cs | using Avalonia.Controls;
using Avalonia.ReactiveUI;
using ReactiveUI;
using System.Reactive.Disposables;
namespace v2rayN.Desktop.Views
{
public partial class OptionSettingWindow : ReactiveWindow<OptionSettingViewModel>
{
private static Config _config;
public OptionSettingWindow()
{
... |
this.Bind(ViewModel, vm => vm.KeepOlderDedupl, v => v.togKeepOlderDedupl.IsChecked).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.EnableAutoAdjustMainLvColWidth, v => v.togEnableAutoAdjustMainLvColWidth.IsChecked).DisposeWith(disposables);
this.Bind(ViewModel, ... | this.Bind(ViewModel, vm => vm.DisplayRealTimeSpeed, v => v.togDisplayRealTimeSpeed.IsChecked).DisposeWith(disposables); | csharp | 2025-01-15T11:45:53 |
2dust/v2rayN | de1132c2df5422a16d454be0e49007be8a9c2894 | v2rayN/v2rayN/Views/OptionSettingWindow.xaml.cs | using ReactiveUI;
using System.Globalization;
using System.IO;
using System.Reactive.Disposables;
using System.Windows;
using System.Windows.Media;
namespace v2rayN.Views
{
public partial class OptionSettingWindow
{
private static Config _config;
public OptionSettingWindow()
{
... |
this.Bind(ViewModel, vm => vm.KeepOlderDedupl, v => v.togKeepOlderDedupl.IsChecked).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.EnableAutoAdjustMainLvColWidth, v => v.togEnableAutoAdjustMainLvColWidth.IsChecked).DisposeWith(disposables);
this.Bind(ViewModel, ... | this.Bind(ViewModel, vm => vm.DisplayRealTimeSpeed, v => v.togDisplayRealTimeSpeed.IsChecked).DisposeWith(disposables); | csharp | 2025-01-15T11:45:53 |
2dust/v2rayN | 4ad4e27dc102088c42b613e484b10ad745b6fdd5 | v2rayN/ServiceLib/ViewModels/MainWindowViewModel.cs | using ReactiveUI;
using ReactiveUI.Fody.Helpers;
using Splat;
using System.Reactive;
namespace ServiceLib.ViewModels
{
public class MainWindowViewModel : MyReactiveObject
{
#region Menu
//servers
public ReactiveCommand<Unit, Unit> AddVmessServerCmd { get; }
public ReactiveComm... |
}
public void ReloadResult()
{
// BlReloadEnabled = true;
//Locator.Current.GetService<StatusBarViewModel>()?.ChangeSystemProxyAsync(_config.systemProxyItem.sysProxyType, false);
ShowClashUI = _config.IsRunningCore(ECoreType.sing_box);
if (ShowCl... | BlReloadEnabled = true;
if (_hasNextReloadJob)
{
_hasNextReloadJob = false;
await Reload();
} | csharp | 2025-01-14T09:05:13 |
2dust/v2rayN | 73706849859bb13f2680355065b488a886565bb8 | v2rayN/ServiceLib/Common/FileManager.cs | using System.Formats.Tar;
using System.IO.Compression;
using System.Text;
namespace ServiceLib.Common
{
public static class FileManager
{
private static readonly string _tag = "FileManager";
public static bool ByteArrayToFile(string fileName, byte[] content)
{
try
... |
}
} | public static void DeleteExpiredFiles(string sourceDir, DateTime dtLine)
{
try
{
var files = Directory.GetFiles(sourceDir, "*.*");
foreach (var filePath in files)
{
var file = new FileInfo(filePath);
... | csharp | 2025-01-14T09:04:43 |
2dust/v2rayN | 5ae58e6a980f0d21ca8f11dad2492840262bcaab | v2rayN/ServiceLib/ViewModels/MainWindowViewModel.cs | using ReactiveUI;
using ReactiveUI.Fody.Helpers;
using Splat;
using System.Reactive;
namespace ServiceLib.ViewModels
{
public class MainWindowViewModel : MyReactiveObject
{
#region Menu
//servers
public ReactiveCommand<Unit, Unit> AddVmessServerCmd { get; }
public ReactiveComm... |
BlReloadEnabled = false;
await LoadCore();
Locator.Current.GetService<StatusBarViewModel>()?.TestServerAvailability();
await SysProxyHandler.UpdateSysProxy(_config, false);
_updateView?.Invoke(EViewAction.DispatcherReload, null);
}
public ... | //If there are unfinished reload job, wait a few seconds and exec again.
if (!BlReloadEnabled)
{
await Task.Delay(3000);
if (times > 3) return;
await Reload(++times);
return;
} | csharp | 2025-01-14T06:49:17 |
YAML Metadata Warning:The task_categories "text2text-generation" is not in the official list: text-classification, token-classification, table-question-answering, question-answering, zero-shot-classification, translation, summarization, feature-extraction, text-generation, fill-mask, sentence-similarity, text-to-speech, text-to-audio, automatic-speech-recognition, audio-to-audio, audio-classification, audio-text-to-text, voice-activity-detection, depth-estimation, image-classification, object-detection, image-segmentation, text-to-image, image-to-text, image-to-image, image-to-video, unconditional-image-generation, video-classification, reinforcement-learning, robotics, tabular-classification, tabular-regression, tabular-to-text, table-to-text, multiple-choice, text-ranking, text-retrieval, time-series-forecasting, text-to-video, image-text-to-text, image-text-to-image, image-text-to-video, visual-question-answering, document-question-answering, zero-shot-image-classification, graph-ml, mask-generation, zero-shot-object-detection, text-to-3d, image-to-3d, image-feature-extraction, video-text-to-text, keypoint-detection, visual-document-retrieval, any-to-any, video-to-video, other
Real-FIM-Eval Benchmark
Real-FIM-Eval is a benchmark to evaluate Fill-in-the-Middle (FIM) capabilities of code LLMs in scenarios that reflect real-world code completion. Real-FIM-Eval is built using data from GitHub commits between Jan. 2025 and Feb. 2025. These commits originate from 228 permissively licensed GitHub repositories with 10,000+ stars, spanning the top 12 widely-used programming languages.
We process git commits using diff_match_patch (https://github.com/google/diff-match-patch) to identify line-level changes. The commits are then categorized into two splits: Add and Edit.
Add(17,879 examples): This split uses git commits where a developer added a new segment of code into an existing file. To create the FIM prompt, we treat the added code segment as the "middle" part that the language model needs to predict. The code surrounding the addition forms the prefix (code before) and the suffix (code after).Edit(13,922 examples): This split uses git commits where a developer modified existing code by removing a segment and replacing it with a new one. We present this task to LLMs in a conflict-merge format. The prompt includes the code context (prefix and suffix) and marks the original code segment (to be removed). The model is asked to infill the updated code segment.
Evaluation Metric
The evaluation metric is character-level perplexity (lower = better), calculated as:
In this formula, p_i represents the probability the model assigns to the i-th token of the ground truth (only the "middle" part that the model is tasked to infill), and n_char(mid) is the total number of characters in that ground truth middle segment.
Statistics of Programming Languages
| Language | Num Examples |
|---|---|
| Python | 6,271 |
| Rust | 4,727 |
| Java | 3,716 |
| C++ | 3,265 |
| TypeScript | 3,182 |
| Go | 2,587 |
| Ruby | 1,686 |
| C# | 1,563 |
| JavaScript | 1,502 |
| Kotlin | 1,440 |
| PHP | 1,396 |
| Scala | 466 |
Copyright Information
The dataset is a verbatim snapshot of source‑code files from public GitHub repositories. Each data example retains the exact license chosen by its original author(s). The repository of origin for every file is recorded in that data example’s repo field. To reuse or redistribute any code sample, you must comply with the license found in the upstream repository (see the LICENSE file in that repo for full terms). The dataset organization and the README.md file are licensed under Creative Commons Attribution 4.0 International (CC‑BY‑4.0).
- Downloads last month
- 59
