tangledgroup/tangled-llama-a-128k-base-v0.1
Text Generation
•
Updated
•
817
content
stringlengths 38
450k
| lang
stringclasses 1
value | size
int64 38
450k
| ext
stringclasses 3
values | max_stars_count
int64 1
357
⌀ | avg_line_length
float64 7.6
67.5
| max_line_length
int64 21
468
| alphanum_fraction
float64 0.31
0.83
|
---|---|---|---|---|---|---|---|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Testsuite Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2012, Vadim Godunko <vgodunko@gmail.com> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- Check whether 'namespace' and 'owner' attributes of UML::Operation class
-- are computed properly.
------------------------------------------------------------------------------
with League.Strings;
with AMF.Facility;
with AMF.Factories.UML_Factories;
with AMF.UML.Classes;
with AMF.UML.Elements;
with AMF.UML.Namespaces;
with AMF.UML.Packageable_Elements.Collections;
with AMF.UML.Packages;
with AMF.UML.Operations.Collections;
with AMF.URI_Stores;
with AMF.Internals.Modules.UML_Module;
pragma Unreferenced (AMF.Internals.Modules.UML_Module);
procedure Test_222 is
use type AMF.UML.Elements.UML_Element_Access;
use type AMF.UML.Namespaces.UML_Namespace_Access;
function "+"
(Item : Wide_Wide_String) return League.Strings.Universal_String
renames League.Strings.To_Universal_String;
UML_URI : constant League.Strings.Universal_String
:= +"http://www.omg.org/spec/UML/20100901";
Store : AMF.URI_Stores.URI_Store_Access;
UML_Factory : AMF.Factories.UML_Factories.UML_Factory_Access;
The_Package : AMF.UML.Packages.UML_Package_Access;
The_Class : AMF.UML.Classes.UML_Class_Access;
The_Operation : AMF.UML.Operations.UML_Operation_Access;
The_Namespace : AMF.UML.Namespaces.UML_Namespace_Access;
Packaged_Element :
AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element;
Owned_Operation :
AMF.UML.Operations.Collections.Ordered_Set_Of_UML_Operation;
The_Element : AMF.UML.Elements.UML_Element_Access;
begin
-- Initialize facility.
AMF.Facility.Initialize;
-- Create URI store.
Store := AMF.Facility.Create_URI_Store (+"local:///test");
-- Lookup for factory.
UML_Factory :=
AMF.Factories.UML_Factories.UML_Factory_Access
(Store.Get_Factory (UML_URI));
-- Create elements.
The_Package := UML_Factory.Create_Package;
The_Class := UML_Factory.Create_Class;
The_Operation := UML_Factory.Create_Operation;
-- Link elements.
Packaged_Element := The_Package.Get_Packaged_Element;
Packaged_Element.Add (The_Class);
Owned_Operation := The_Class.Get_Owned_Operation;
Owned_Operation.Add (The_Operation);
-- Check value of 'namespace' attribute.
The_Namespace := The_Operation.Get_Namespace;
if The_Namespace = null then
raise Program_Error;
end if;
if The_Namespace /= AMF.UML.Namespaces.UML_Namespace_Access (The_Class) then
raise Program_Error;
end if;
-- Check value of 'owner' attribute.
The_Element := The_Operation.Get_Owner;
if The_Element = null then
raise Program_Error;
end if;
if The_Element /= AMF.UML.Elements.UML_Element_Access (The_Class) then
raise Program_Error;
end if;
end Test_222;
| Ada | 6,121 | adb | 24 | 44.035971 | 79 | 0.53586 |
-- generic_list.adb -*- Ada -*-
--
-- This package defines a generic list and list iterator.
--
-- Author: Eric Gustafson
-- Date: 25 August 1998
--
-- ------------------------------------------------------------
--
-- $Revision$
--
-- $Log$
-- ------------------------------------------------------------
package body Generic_List is
-- ----- List_Type Methods ---------------------------------
procedure List_Add( List : in out List_Type;
Element : in Element_Type ) is
begin
if List.Num_Elements = List.List'Last then
declare
New_List : Element_Array_Access
:= new Element_Array(1..List.List'Last+3);
begin
New_List(List.List'Range) := List.List.all;
-- Deallocate list.list access
List.List := New_List;
end;
end if;
List.Num_Elements := List.Num_Elements + 1;
List.List(List.Num_Elements) := Element;
end List_Add;
-- ---------------------------------------------------------
function List_New_Iterator( List : in List_Type )
return List_Iterator_Type is
List_Iterator : List_Iterator_Type;
begin
List_Iterator.List := List.List;
List_Iterator.Num_Elements := List.Num_Elements;
return List_Iterator;
end List_New_Iterator;
-- ----- List_Iterator_Type Methods ------------------------
function Is_Next( List_Iterator : in List_Iterator_Type )
return Boolean is
begin
if List_Iterator.Index <= List_Iterator.Num_Elements then
return True;
else
return False;
end if;
end Is_Next;
-- ---------------------------------------------------------
procedure Get_Next( List_Iterator : in out List_Iterator_Type;
Next_Element : out Element_Type ) is
begin
if not Is_Next( List_Iterator ) then
raise Iterator_Bound_Error;
end if;
Next_Element := List_Iterator.List(List_Iterator.Index);
List_Iterator.Index := List_Iterator.Index + 1;
end Get_Next;
end Generic_List;
| Ada | 2,167 | adb | 2 | 23.813187 | 67 | 0.515459 |
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Web Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2015, Vadim Godunko <vgodunko@gmail.com> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
package body Servlet.HTTP_Responses is
----------------
-- Get_Header --
----------------
function Get_Header
(Self : in out HTTP_Servlet_Response'Class;
Name : League.Strings.Universal_String)
return League.Strings.Universal_String
is
Aux : constant League.String_Vectors.Universal_String_Vector
:= Self.Get_Headers (Name);
begin
if Aux.Is_Empty then
return League.Strings.Empty_Universal_String;
else
return Aux (1);
end if;
end Get_Header;
end Servlet.HTTP_Responses;
| Ada | 3,904 | adb | null | 56.57971 | 78 | 0.421619 |
"------------------------------------------------------------------------------\n-- (...TRUNCATED) | Ada | 256,401 | adb | null | 23.290126 | 79 | 0.62632 |
"------------------------------------------------------------------------------\n-- (...TRUNCATED) | Ada | 9,386 | ads | null | 45.563107 | 79 | 0.548476 |
"------------------------------------------------------------------------------\n-- (...TRUNCATED) | Ada | 6,076 | ads | 7 | 46.738462 | 79 | 0.517775 |
"-------------------------------------------------------------------------------\n-- Copyright (c) 2(...TRUNCATED) | Ada | 4,225 | adb | null | 37.389381 | 82 | 0.552899 |
"-----------------------------------------------------------------------\n-- Search.Models -- Searc(...TRUNCATED) | Ada | 57,520 | adb | 9 | 34.299344 | 88 | 0.583171 |
"package Buildinfo with SPARK_Mode is\n\n function Compilation_ISO_Date return String -- implement(...TRUNCATED) | Ada | 626 | ads | 12 | 31.3 | 79 | 0.699681 |
"--\n-- Copyright 2018 The wookey project team <wookey@ssi.gouv.fr>\n-- - Ryad Benadjila\n-- (...TRUNCATED) | Ada | 1,127 | ads | 65 | 28.897436 | 79 | 0.712511 |
A small subset of the-stack dataset, with 87 programming languages, each has 100 random samples from the original dataset for visualization.
The dataset contains 87 programming languages:
'ada', 'agda', 'alloy', 'antlr', 'applescript', 'assembly', 'augeas', 'awk', 'batchfile', 'bison', 'bluespec', 'c',
'c++', 'c-sharp', 'clojure', 'cmake', 'coffeescript', 'common-lisp', 'css', 'cuda', 'dart', 'dockerfile', 'elixir',
'elm', 'emacs-lisp','erlang', 'f-sharp', 'fortran', 'glsl', 'go', 'groovy', 'haskell','html', 'idris', 'isabelle', 'java',
'java-server-pages', 'javascript', 'julia', 'kotlin', 'lean', 'literate-agda', 'literate-coffeescript', 'literate-haskell',
'lua', 'makefile', 'maple', 'markdown', 'mathematica', 'matlab', 'ocaml', 'pascal', 'perl', 'php', 'powershell', 'prolog',
'protocol-buffer', 'python', 'r', 'racket', 'restructuredtext', 'rmarkdown', 'ruby', 'rust', 'sas', 'scala', 'scheme',
'shell', 'smalltalk', 'solidity', 'sparql', 'sql', 'stan', 'standard-ml', 'stata', 'systemverilog', 'tcl', 'tcsh', 'tex',
'thrift', 'typescript', 'verilog', 'vhdl', 'visual-basic', 'xslt', 'yacc', 'zig'
You can specify which language you want to load, python is loaded by default:
# to load go:
from datasets import load_dataset
load_dataset("bigcode/the-stack-smol-xs", "go")
DatasetDict({
train: Dataset({
features: ['content', 'lang', 'size', 'ext', 'max_stars_count', 'avg_line_length', 'max_line_length', 'alphanum_fraction'],
num_rows: 100
})
})