blob_id stringlengths 40 40 | content_id stringlengths 40 40 | repo_name stringlengths 5 114 | path stringlengths 5 318 | language stringclasses 5
values | extension stringclasses 12
values | length_bytes int64 200 200k | license_type stringclasses 2
values | content stringlengths 143 200k |
|---|---|---|---|---|---|---|---|---|
d23333cca679a83ea75ab3d203b3cc3c49e960b0 | daeaf5646701a07c66cb479bc6223615065318cc | sadrulhc/chromium | /ui/views/examples/button_example.cc | C++ | cc | 5,743 | permissive | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/views/examples/button_example.h"
#include <memory>
#include <utility>
#include "base/strings/utf_string_conversions.h"
#include "ui/bas... |
f8efa5cd60cbb502c9d589134fb7a23e905f986b | d97f329b050d82bb00e2921ddff7d6674b4d0e4b | manimod7/Prep | /trees/MaxSumNodes.cpp | C++ | cpp | 2,402 | no_license | //*Max Sum nodes such that if there is edge between two nodes than at max only one of them is included
// C++ program to find maximum sum from a subset of
// nodes of binary tree
#include <bits/stdc++.h>
using namespace std;
/* A binary tree node structure */
struct node
{
int data;
struct node *left, *right;
};
... |
15dc545de19525a8d48a985ef12ff04fc1987e6f | b45211f8b65f8d03ea181646069f96d9f1453bf8 | Ujjwalupadhyay123/CPPcodes | /sumoddandevendigit.cpp | C++ | cpp | 277 | no_license | #include<iostream>
using namespace std;
int main(){
int i=1,evensum=0,oddsum=0,n;
cin>>n;
while(n){
int rem=n%10;
if(i==1){
oddsum+=rem;
}
if(i==-1){
evensum+=rem;
}
i*=-1;
n=n/10;
}
cout<<oddsum<<endl;
cout<<evensum<<endl;
return 0;
}
|
0d3cb8ede3db931c0972494123329b605a13cdfe | 1b20c4aa516273c3380acf4a3f4203b1069fd2e1 | jjheaton99/SDL2GameOfLife | /source/Entities/GameObject.cpp | C++ | cpp | 1,058 | no_license | #include "GameObject.h"
GameObject::GameObject(std::string fileName, double xPos, double yPos, double xVel, double yVel, double colliderWidth, double colliderHeight)
: TextureObject(fileName, xPos, yPos), m_collider{ colliderWidth, colliderHeight }//, m_velocity{xVel, yVel}
{}
GameObject::GameObject(double xPos, ... |
9a5e69adb4d9ebadf3a2a2928b181bfe584203c7 | a7a385a19f6e1403cf6be5134c3a776ed525bb52 | alexandraback/datacollection | /solutions_5670465267826688_0/C++/decltypeNULL/main.cpp | C++ | cpp | 3,938 | no_license | #include <iostream>
#include <fstream>
#include <string>
#include <cassert>
using namespace std;
enum Quat
{
ONE = 0,
NONE = 1,
I = 2,
NI = 3,
J = 4,
NJ = 5,
K = 6,
NK =7
};
Quat INV_TABLE[8] = { ONE, NONE, NI, I, NJ, J, NK, K };
Quat MUL_TABLE[8][8] =
{
{ ONE, N... |
de1a3f75a5d5fc8d371397ac8b0fac77ea07cb8f | d54ce03281aff18f76cee77a809d5ceaadd53974 | niuxu18/logTracker-old | /second/download/httpd/gumtree/httpd_repos_function_36_httpd-2.3.8.cpp | C++ | cpp | 6,131 | no_license | int main(int argc, const char * const argv[])
{
apr_pool_t *pool;
apr_status_t rv;
apr_size_t l;
char pwi[MAX_STRING_LEN];
char pwc[MAX_STRING_LEN];
char errbuf[MAX_STRING_LEN];
const char *arg;
int need_file = 1;
int need_user = 1;
int need_pwd = 1;
int need_cmnt = 0;
... |
152542cd2f4679b433e804677dc709a36a6250e3 | 899ef5903572ecb22a839540dbb8889a8e63acce | Kadoarc/ViruscideMaster | /ViruscideMaster/ViruscideMaster/Animation.cpp | C++ | cpp | 774 | no_license | #include "Animation.h"
Animation::Animation(sf::Texture& texture, sf::Vector2u & noOfFrames, float frameTime)
: noOfFrames(noOfFrames), frameTime(frameTime), totalTime(0)
{
frameSize.width = texture.getSize().x / float(noOfFrames.x);
frameSize.height = texture.getSize().y / float(noOfFrames.y);
}
Animation::~Anim... |
e48b719fbf94ed3b193e79ea1ee2d88bebff620d | ffb19f08c5defcda3eb374bd96ff0c7a27f11b23 | tac0x2a/ClickHouse | /src/Processors/Executors/PipelineExecutor.cpp | C++ | cpp | 21,851 | permissive | #include <Processors/Executors/PipelineExecutor.h>
#include <queue>
#include <IO/WriteBufferFromString.h>
#include <Processors/printPipeline.h>
#include <Common/EventCounter.h>
#include <ext/scope_guard.h>
#include <Common/CurrentThread.h>
#include <Processors/ISource.h>
#include <Common/setThreadName.h>
#include <Inte... |
cfdfde703fed2288c90098e46c9eb2c05be98ed0 | a4f5e98b3ce4c9b6af5f065241c3fe2dabb4c026 | benehret/MulticopterSim | /Source/HackflightModule/pawns/HackflightPhantomPawn.cpp | C++ | cpp | 992 | permissive | /*
* Class implementation for Phantom pawn in MulticopterSim
*
* Copyright (C) 2019 Simon D. Levy
*
* MIT License
*/
#include "HackflightPhantomPawn.h"
#include "SimMotor.hpp"
AHackflightPhantomPawn::AHackflightPhantomPawn()
{
_phantom.build(this);
}
void AHackflightPhantomPawn::PostInitializeComponents()
{
... |
686d97c9ef2adadbc61a658eefff1312b8cd5160 | a9b427eae524e367df76c7abe022bc29e065b609 | jpkenny/sst-macro | /sumi-mpi/mpi_api_probe.cc | C++ | cc | 3,584 | permissive | /**
Copyright 2009-2021 National Technology and Engineering Solutions of Sandia,
LLC (NTESS). Under the terms of Contract DE-NA-0003525, the U.S. Government
retains certain rights in this software.
Sandia National Laboratories is a multimission laboratory managed and operated
by National Technology and Engineering... |
855601aa70a6eaea8d4f2241d67730d1eb3ca538 | 44e3338e6d4c1ca7816b2c99e1e0493d0b4aaae6 | glancing/binaryen | /src/passes/SimplifyGlobals.cpp | C++ | cpp | 8,974 | permissive | /*
* Copyright 2019 WebAssembly Community Group participants
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by... |
96cad0fd315a1cf5164e9cd90b5cf695f8551ba8 | 0314aa37d606872c82510bb0ca789575d203d336 | whunmr/circa | /src/symbols.cpp | C++ | cpp | 2,775 | permissive | // Copyright (c) Andrew Fischer. See LICENSE file for license terms.
#include "common_headers.h"
#include "hashtable.h"
#include "names_builtin.h"
#include "source_repro.h"
#include "symbols.h"
#include "tagged_value.h"
#include "term.h"
#include "type.h"
namespace circa {
Value* g_runtimeSymbolMap; // Maps stri... |
747800bdb26316699ddd09d8f6d1791531d75f17 | e6a55a9ccc6df9beac6e78b66eaa15f22c903e4b | crdroidandroid/android_system_vold | /model/VolumeEncryption.cpp | C++ | cpp | 3,290 | no_license | /*
* Copyright (C) 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... |
c87520ca18b80d09e72e19081f8f35614c3f5839 | 18258a70b8ac1342753fa85b0db2b5948dc88277 | JayQuantRise20/My_Projects | /ADEMethod.cpp | C++ | cpp | 1,235 | no_license | //XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// LatticeMethod.cpp
//XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#include <cmath>
#include <vector>
#include <stdexcept>
#include <algorithm>
#include "ADEMethod.h"
#include "pde.h"
#includ... |
966091353903b260309b32ba3d32def398d38325 | c2a1745475c9fda2cc666b0dc1c1f1f52b5206e1 | SoundMetrics/aris-integration-sdk | /common/code/ManagedProtocolSupport/ArisFramestreamWrapper/dllmain.cpp | C++ | cpp | 525 | permissive | // WARNING: This code is meant for integration testing only, it is not production-ready.
// THIS CODE IS UNSUPPORTED.
// dllmain.cpp : Defines the entry point for the DLL application.
#include "stdafx.h"
BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
L... |
a8e556bc15d62d27b27eac3b9f5b0db7dda3aee7 | 4acfa9ed2c5597dd2d16a125cf6e43acfecc3181 | knetikmedia/knetikcloud-tizen-client | /src/Rule_Engine_ExpressionsManager.cpp | C++ | cpp | 13,600 | no_license | #include <glib-object.h>
#include <json-glib/json-glib.h>
#include "Rule_Engine_ExpressionsManager.h"
#include "NetClient.h"
#include "Helpers.h"
#include "Error.h"
#include "RequestInfo.h"
using namespace std;
using namespace Tizen::ArtikCloud;
Rule_Engine_ExpressionsManager::Rule_Engine_ExpressionsManager()
{
}
... |
f173c6cbd78fe3d46f76cb9bdac16a7789de0db3 | 1b12b34627997e0c9b204846cb046ea7ef36bd35 | kyos1704/aoj | /C++/Volume000/AOJ-0042-20121127(dp ナップサック 盗賊).cpp | C++ | cpp | 770 | no_license | #include<iostream>
#include<cstdio>
#include<string>
#include<vector>
#include<cmath>
#include<cstdio>
#include<algorithm>
#include <utility>
using namespace std;
int main(){
int dp[10100];
int W,N;
int v[1010],w[1010];
int count=0;
while(cin>>W,W){
cin>>N;
count++;
for(int i=... |
e02351c76bc654a0abdee6d5fd0703b1652a48de | b449373ef65559398883f53cb9b37a1f5f4367fc | Baymxs/FIT-OOP | /C++/Lab_3/ViewFactory/Views/SFMLView/WindowFactory/Windows/OptionsWindow.cpp | C++ | cpp | 1,376 | permissive | //
// Created by Bayramov Nidjat on 16.12.18.
//
#include "OptionsWindow.h"
#include "../WindowFactory.h"
#include "../WindowCreators/OptionsCreator.h"
//Initialize the window before running main
//Anonymous namespace
namespace {
//Global function
bool initializeOptionsWindow() {
WindowFactory::getIn... |
aa1196fc172611a85e598eadb9bff2ca5e3412f3 | 263234e6f0d4cd13f42cdd4054bd164e0514bba4 | schreibikus/nmPlayer | /Source/IO/COpenSSL.cpp | C++ | cpp | 2,760 | no_license | /************************************************************************
VisualOn Proprietary
Copyright (c) 2012, VisualOn Incorporated. All Rights Reserved
VisualOn, Inc., 4675 Stevens Creek Blvd, Santa Clara, CA 95051, USA
All data and information contained in or disclosed by this document are
confiden... |
57b3c0d4b6c6a4c1d639effa59bb1012b35bcfc8 | 4303f240930691d013498b4b1fba2b9a10438dcb | iridium-browser/iridium-browser | /chrome/browser/extensions/forced_extensions/install_stage_tracker_factory.cc | C++ | cc | 1,460 | permissive | // Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/extensions/forced_extensions/install_stage_tracker_factory.h"
#include "base/no_destructor.h"
#include "chrome/browser/extensions/forced_extensions/in... |
46ae02a67bcd33ba84c72c3d5ac0b8ade5c141bc | b100b31e2bc2445a08f131b58f048a137a189e8d | stitchEm/stitchEm | /lib/src/core/pyramid.hpp | C++ | hpp | 6,949 | permissive | // Copyright (c) 2012-2017 VideoStitch SAS
// Copyright (c) 2018 stitchEm
#pragma once
#include "gpu/uniqueBuffer.hpp"
#include "gpu/stream.hpp"
#include "libvideostitch/logging.hpp"
#include <stdint.h>
#include <vector>
namespace VideoStitch {
namespace Core {
/**
* @brief A class that computes pyramids of imag... |
341d5338fb8854acda75d5683ef95e6835bc1ec7 | 507bcddf768076fac27d8974b32fb986d37e693e | tars0x9752/atcoder | /pana2020/c.cpp | C++ | cpp | 476 | no_license | #include <bits/stdc++.h>
#define all(x) (x).begin(), (x).end()
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
const string ln = "\n";
constexpr int INF = 1001001001;
constexpr int MOD = 1000000007;
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
ll a, b, c;
cin >> a >> b >> c;
... |
Stack v2 Clean — 200K Multi-Language Code Subset
A cleaned and filtered subset of bigcode/the-stack-v2.
Dataset Summary
This dataset was assembled to support fine-tuning models such as ModernBERT, Llama, Qwen on programming language data. It provides a balanced, deduplicated, and filtered collection of real-world source files drawn from public repositories indexed by Software Heritage and curated by the BigCode project.
| Language | Files |
|---|---|
| Python | 40,001 |
| JavaScript | 40,001 |
| Java | 40,001 |
| C++ | 40,001 |
| Go | 40,001 |
| Total | 200,005 |
Limitations and Considerations
This dataset is a relatively small sample of the full Stack v2 corpus and is not intended for training large code generation models from scratch. Files retain their original licenses as classified upstream, and users are responsible for verifying license compatibility with their downstream use cases. No personally identifiable information removal pass has been applied beyond what is present in the upstream Stack v2 release; users redistributing derivative artifacts should consider running a PII scrubbing pass such as bigcode-pii before publication. Near-duplicate detection (for example, MinHash-based) was not applied and may be beneficial for some training scenarios.
Source and License
The underlying data originates from bigcode/the-stack-v2, which is governed by the BigCode project's terms of use and the original repository licenses of each source file. Users of this derivative dataset must comply with the upstream Stack v2 terms, available on the original dataset page. The license_type field is preserved from the upstream dataset to support license-aware filtering.
Citation
If you use this dataset, please cite the original Stack v2 release:
@article{lozhkov2024starcoder,
title={StarCoder 2 and The Stack v2: The Next Generation},
author={Lozhkov, Anton and others},
journal={arXiv preprint arXiv:2402.19173},
year={2024}
}
- Downloads last month
- 42