code
stringlengths
114
1.05M
path
stringlengths
3
312
quality_prob
float64
0.5
0.99
learning_prob
float64
0.2
1
filename
stringlengths
3
168
kind
stringclasses
1 value
% % reia_class: Build modules conforming to the gen_server behavior from Reia classes % Copyright (C)2008 <NAME> % % Redistribution is permitted under the MIT license. See LICENSE for details. % -module(reia_class). -export([build/1, build/2, ast/1, inst/3, call/2, cast/2]). %% Convert a Reia class definition into a...
attic/src/core/reia_class.erl
0.547585
0.473231
reia_class.erl
starcoder
%% -*- erlang-indent-level: 4;indent-tabs-mode: nil -*- %% -------------------------------------------------- %% This file is provided to you 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 %% %% ...
src/parse_trans_codegen.erl
0.518059
0.453262
parse_trans_codegen.erl
starcoder
-module(els_hover_SUITE). -include("erlang_ls.hrl"). %% CT Callbacks -export([ suite/0 , init_per_suite/1 , end_per_suite/1 , init_per_testcase/2 , end_per_testcase/2 , groups/0 , all/0 ]). %% Test cases -export([ hover_docs/1 , hover_docs_local/1 ...
test/els_hover_SUITE.erl
0.521715
0.723199
els_hover_SUITE.erl
starcoder
-module(erlplex). -author("<NAME> <<EMAIL>>"). %-export([file/1, file/2, bootstrap/0]). -include("../include/erlplex.hrl"). -compile([export_all]). %% @doc Creates a new simplex from the evaluation function and some intial points %% The function must take one vector and return the value at that point. %% @spec cr...
src/erlplex.erl
0.52902
0.626524
erlplex.erl
starcoder
% Copyright 2010-2012 <NAME> (http://vmx.cx/) % % 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 applicable law or agre...
src/wkt.erl
0.61231
0.703409
wkt.erl
starcoder
%% %% %CopyrightBegin% %% %% Copyright Ericsson AB 2007-2016. All Rights Reserved. %% %% 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 ...
lib/percept/src/percept_image.erl
0.600423
0.511168
percept_image.erl
starcoder
%% Copyright (c) 2013 <NAME> %% %% 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 applicable law or agreed to in w...
src/luerl_comp_peep.erl
0.53048
0.545588
luerl_comp_peep.erl
starcoder
%% @copyright 2016 <NAME> <<EMAIL>> %% %% This software is released under the MIT License. %% See the LICENSE file in the project root for full license information. %% %% @doc An Eventual Leader Election Library %% %% This module provides functionality to elect the leader %% which will be eventually agreed by all membe...
src/evel.erl
0.574514
0.49707
evel.erl
starcoder
%%%============================================================================= %%% @doc Advent of code puzzle solution %%% @end %%%============================================================================= -module(aoc2020_day24). -behavior(aoc_puzzle). -export([ parse/1 , solve1/1 , solve2/1 ...
src/2020/aoc2020_day24.erl
0.609989
0.595669
aoc2020_day24.erl
starcoder
%% ------------------------------------------------------------------- %% %% Copyright (c) 2019 <NAME>. All Rights Reserved. %% %% This file is provided to you 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 ...
src/rcvd.erl
0.599602
0.400896
rcvd.erl
starcoder
%% Copyright (c) 2018 <NAME> %% %% Permission is hereby granted, free of charge, to any person obtaining a %% copy of this software and associated documentation files (the "Software"), %% to deal in the Software without restriction, including without limitation %% the rights to use, copy, modify, merge, publish, distr...
test/stacktrace_compat_SUITE.erl
0.689096
0.460228
stacktrace_compat_SUITE.erl
starcoder
%% %% %CopyrightBegin% %% %% Copyright Ericsson AB 2018. All Rights Reserved. %% %% 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 %% %% Un...
lib/compiler/src/beam_ssa_pre_codegen.erl
0.719384
0.528168
beam_ssa_pre_codegen.erl
starcoder
%% @author Couchbase <<EMAIL>> %% @copyright 2015 Couchbase, Inc. %% %% 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 requir...
src/single_bucket_kv_sup.erl
0.59408
0.41401
single_bucket_kv_sup.erl
starcoder
%% ------------------------------------------------------------------- %% %% Copyright (c) 2014 Basho Technologies, Inc. All Rights Reserved. %% %% This Source Code Form is subject to the terms of the Mozilla Public %% License, v. 2.0. If a copy of the MPL was not distributed with this %% file, You can obtain on...
src/external/cloudi_x_exometer_core/src/exometer_report.erl
0.769687
0.475301
exometer_report.erl
starcoder
%%% @doc A consistent hashing library. The output range of the ring is the same %%% as what SHA-256 produces. Nodes and keys are mapped to the ring using SHA-256 as well. %%% @end -module(concha). %% API exports -export([add/2, contains/2, lookup/2, members/1, new/1, new/2,...
src/concha.erl
0.712432
0.639201
concha.erl
starcoder
%% ------------------------------------------------------------------- %% %% Copyright (c) 2007-2015 Basho Technologies, Inc. All Rights Reserved. %% %% This file is provided to you under the Apache License, %% Version 2.0 (the "License"); you may not use this file %% except in compliance with the License. You may ob...
src/machi_chain_repair.erl
0.621885
0.495239
machi_chain_repair.erl
starcoder
%%====================================================================== %% %% LeoFS Doctor %% %% Copyright (c) 2012-2016 Rakuten, Inc. %% %% This file is provided to you 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 co...
src/ets_view.erl
0.561215
0.470493
ets_view.erl
starcoder
%% %% @doc direct test check (dtchk) provider for rebar3 %% %% This provider will determine the length of the call path between a test %% function and any function called in the target module. %% %% This code based in part on the xref provider from the rebar3 project %% https://github.com/rebar/rebar3/blob/master/src/...
src/dtchk_prv.erl
0.509032
0.468061
dtchk_prv.erl
starcoder
-module(cauder_eval). %% API -export([seq/3, abstract/1, concrete/1, is_value/1, is_reducible/2]). -export([match_rec_pid/6, match_rec_uid/4]). -export([clause_line/3]). -include("cauder.hrl"). %%%============================================================================= %%% API %%%==============================...
src/cauder_eval.erl
0.557725
0.562267
cauder_eval.erl
starcoder
%%%------------------------------------------------------------------- %%% @author <NAME> %%% @copyright (C) 2021 ACK CYFRONET AGH %%% This software is released under the MIT license %%% cited in 'LICENSE.txt'. %%% @end %%%------------------------------------------------------------------- %%% @doc %%% This module impl...
src/modules/datastore/infinite_log/infinite_log.erl
0.520253
0.53777
infinite_log.erl
starcoder
-module(slacker_conversation). -include("spec.hrl"). -export([archive/2, create/2, history/3, info/2, invite/3, join/2, kick/3, leave/2, list/2, mark/3, rename/3, set_purpose/3, set_topic/3, unarchive/2]). %% @doc Archives a conversation. -spec archive(Token :: string(), Channel :: string()) -> ht...
src/slacker_conversation.erl
0.564098
0.439266
slacker_conversation.erl
starcoder
-module(crdt_set_or_SUITE). %% Callbacks -export( [ all/0 , groups/0 ]). %% Test cases -export( [ t_replicate_crud_merge/1 , t_serialization/1 ]). -define(GROUP , crdt_set_or). %% ============================================================================ %% Common Test callbacks %% =====...
test/crdt_set_or_SUITE.erl
0.503418
0.507324
crdt_set_or_SUITE.erl
starcoder
%% @author Couchbase <<EMAIL>> %% @copyright 2016-2019 Couchbase, Inc. %% %% 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 r...
src/menelaus_roles.erl
0.648578
0.425009
menelaus_roles.erl
starcoder
%%% % % https://www.futurelearn.com/courses/functional-programming-erlang/1/assignments/161825/ % -module(ex1_24). -export([perimiter/1,area/1,enclose/1,bits/1,bits_tail/1]). -include_lib("eunit/include/eunit.hrl"). %%% First part the shapes % I have assumed that triangels are right-angled trianges for simplicity of ...
week1/ex1_24.erl
0.665084
0.820829
ex1_24.erl
starcoder
%% Copyright 2019, JobTeaser %% %% 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 applicable law or agreed to in w...
src/hotp_validator.erl
0.726426
0.448547
hotp_validator.erl
starcoder
%%%---------------------------------------------------------------------- %%% File : cord.erl %%% Author : <NAME> <<EMAIL>> %%% Purpose : Data structure for large strings of text %%% Created : 21 Oct 2000 by <NAME> <<EMAIL>> %%%---------------------------------------------------------------------- %% %% Cords - a s...
apps/pie/src/cord.erl
0.538983
0.491822
cord.erl
starcoder
%% %% Copyright (c) 2016-2018 <NAME>. All Rights Reserved. %% %% This file is provided to you 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 %% %...
src/ldb_util.erl
0.553143
0.444625
ldb_util.erl
starcoder
%%%------------------------------------------------------------------- %%% @author <NAME> %%% @copyright (C) 2019, <COMPANY> %%% @doc %%% %%% @end %%% Created : 29. Oct 2019 6:55 AM %%%------------------------------------------------------------------- -module(round_robin). -author("<NAME>"). -export([init/0, add/1, ne...
src/otp_system/round_robin.erl
0.605566
0.494263
round_robin.erl
starcoder
%% @author <NAME> <<EMAIL>> %% @copyright 2018 <NAME> <<EMAIL>> %% %% @doc 'Species3' rules implementation module for 'cgolam' app. %% %% This is based on 'Species1', following the failure of 'Species2'. %% Here the strategy is simply to make colours/species more compatible %% by changing the colour matching algorithm...
src/cgolam_rules_species3.erl
0.531696
0.443299
cgolam_rules_species3.erl
starcoder
%%%------------------------------------------------------------------------ %% Copyright 2019, OpenTelemetry Authors %% 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.o...
src/ot_span.erl
0.691185
0.429041
ot_span.erl
starcoder
% 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 applicable law or agreed to in writing, software % distributed under the ...
src/vtreeviz.erl
0.604165
0.460774
vtreeviz.erl
starcoder
%% @doc %% The buffer stores temporary, which is implicitly discarded, %% and permanent data, which are explicitly discarded. %% %% Data is always delivered in the order they are buffered. %% The temporary data is stored in a queue. Permanent data %% is stored in a wheel for performance and to avoid discards. %% @end -...
src/gen_stage_buffer.erl
0.527317
0.577495
gen_stage_buffer.erl
starcoder
%%%------------------------------------------------------------------- %%% @doc %%% Based on SumoDB `sumo_type'. %%% %%% @reference See %%% <a href="https://github.com/inaka/sumo_db/blob/master/src/utils/sumo_type.erl">SumoDB</a> %%% @end %%% @end %%%------------------------------------------------------------------- -...
src/schema/xdb_schema_type.erl
0.568416
0.493348
xdb_schema_type.erl
starcoder
%%% vi:ts=4 sw=4 et %%%------------------------------------------------------------------- %%% @author <NAME> <<EMAIL>> %%% @copyright 2011 Erlware, LLC. %%% @doc %%% A module that supports association of keys to values. A map cannot %%% contain duplicate keys; each key can map to at most one value. %%% %%% This int...
src/ec_dictionary.erl
0.514644
0.42925
ec_dictionary.erl
starcoder
-module(icu_string). -export([from_utf8/1, to_utf8/1, transform_utf8/2, transform/2, to_lower/1, to_lower/2, to_upper/1, to_upper/2, normalize/2, transliterate/2, transliterate/3]). %% @doc Convert an UTF-8 encoded binary string to an ICU string. -spec from_utf8(binary()) -> icu:us...
src/icu_string.erl
0.535098
0.577883
icu_string.erl
starcoder
%% ------------------------------------------------------------------- %% %% Copyright (c) 2007-2012 Basho Technologies, Inc. All Rights Reserved. %% %% This file is provided to you under the Apache License, %% Version 2.0 (the "License"); you may not use this file %% except in compliance with the License. You may ob...
src/riak_core_stat_q.erl
0.673192
0.451327
riak_core_stat_q.erl
starcoder
%% @author <NAME> <<EMAIL>> %% @copyright 2009 <NAME> %% @doc Validator for checking if an input value matches a regular expression %% Copyright 2009 <NAME> %% %% 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...
modules/mod_base/validators/validator_base_format.erl
0.528777
0.435421
validator_base_format.erl
starcoder
%% @doc Abuse module constant pools as a "read-only shared heap" (since erts 5.6) for non-binary %% Erlang terms. %% <a href="http://www.erlang.org/pipermail/erlang-questions/2009-March/042503.html">[1]</a>. %% Based on <a href="https://mochiweb.googlecode.com/svn/trunk/src/mochiglobal.erl">[2]</a>. %% %...
src/fling_mochiglobal.erl
0.561455
0.446736
fling_mochiglobal.erl
starcoder
%% A priority queue based on gb_trees -module(tiny_pq). -export([ delete_value/3, insert_value/3, move_value/4, foldr_new/4, prune_old/2, prune_collect_old/4 ]). %% @spec delete_value(Priority, Value, Tree) -> Tree1 %% @doc Delete a `Value' associated with `Pri...
src/tiny_pq.erl
0.598312
0.538741
tiny_pq.erl
starcoder
%Copyright [2012] [<NAME>] % 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 applicable law or agreed to in writ...
src/coello_basic.erl
0.617974
0.432962
coello_basic.erl
starcoder
%% Copyright 2016-2017 TensorHub, Inc. %% %% 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 applicable law or agreed t...
src/guild_data_reader.erl
0.619701
0.421671
guild_data_reader.erl
starcoder
%% Copyright 2018 <NAME> (http://dairon.org) %% %% 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 applicable law o...
src/sentry.erl
0.557725
0.431584
sentry.erl
starcoder
%%%------------------------------------------------------------------------ %% Copyright 2019, OpenTelemetry Authors %% 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.o...
src/otel.erl
0.556279
0.458531
otel.erl
starcoder
%%% @doc Tells server to switch to "COPY-in" mode %%% %%% See [https://www.postgresql.org/docs/current/sql-copy.html]. %%% See [https://www.postgresql.org/docs/current/protocol-flow.html#PROTOCOL-COPY]. %%% %%% When `Format' is `text', copy data should then be delivered using Erlang %%% <a href="https://erlang.org/doc/...
src/commands/epgsql_cmd_copy_from_stdin.erl
0.553988
0.462048
epgsql_cmd_copy_from_stdin.erl
starcoder
%%%=================================================================== %%% @copyright 2019 Klarna Bank AB (publ) %%% %%% @doc This behavior can be seen as the opposite of {@link %%% kflow_gen_aggregate}; it implements a stream processing node that %%% applies a pure function to each incoming message. This function %%% ...
src/framework/kflow_gen_unfold.erl
0.663015
0.488283
kflow_gen_unfold.erl
starcoder
%% %% @doc A problem of finding celebrities. %% %% Imaging a set `P' of people at a party. %% Say a subset `C' of `P' forms a <em>celebrity clique</em> if %% `C' is nonempty, everybody at the party knows every member %% of `C', but members of `C' know only each other. %% Find this celebrity clique, assuming it exists. ...
lib/ndpar/src/celebrities.erl
0.512449
0.556159
celebrities.erl
starcoder
%% Copyright (c) 2016, <NAME> <<EMAIL>> %% %% This software is released under the MIT License. %% See the LICENSE file in the project root for full license information. %% %% @doc A priority queue implementation of using the pairing heap algorithm %% @private -module(ppg_pq). %%----------------------------------------...
src/ppg_pq.erl
0.727589
0.412264
ppg_pq.erl
starcoder
%%%------------------------------------------------------------------- %%% @copyright (C) 2016, AdRoll %%% @doc %%% %%% Kinesis record aggregator. %%% %%% Follows the KPL aggregated record format: %%% https://github.com/awslabs/amazon-kinesis-producer/blob/master/aggregation-format.md %%% %%% This is an...
src/kpl_agg.erl
0.672117
0.526525
kpl_agg.erl
starcoder
% ============================================================================== % Exponential distribution % ============================================================================== -module(exponential). -export([pdf/2, cdf/2, invcdf/2, rnd/2]). -ifdef(TEST). -include_lib("eunit/include/eunit.hrl"). -endif. ...
src/exponential.erl
0.579043
0.566258
exponential.erl
starcoder
% License: Apache License, Version 2.0 % % 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 applicable law or agreed to in...
src/core/costmap_utils.erl
0.514644
0.425247
costmap_utils.erl
starcoder
-module(kdtree_h3_SUITE). -include_lib("common_test/include/ct.hrl"). -include_lib("eunit/include/eunit.hrl"). -export([all/0]). -export([ basic_test/1, add_test/1, remove_test/1 ]). all() -> [ basic_test, add_test, remove_test ]. basic_test...
test/kdtree_h3_SUITE.erl
0.583797
0.469581
kdtree_h3_SUITE.erl
starcoder
-module( sqerl_validator ). -author( "<NAME> <<EMAIL>>" ). -export( [ validate/2 ] ). %% %% Specification Type %% -type spec() :: atom() | { atom(), integer() } | { atom(), integer(), integer() }. %% %% Match the given value against the provided list of specifications. If %% any of the specifications fail, all faile...
src/core/sqerl_validator.erl
0.566738
0.485966
sqerl_validator.erl
starcoder
% @doc Communicate with the % <a href="https://datasheets.maximintegrated.com/en/ds/DS18B20.pdf"> % DS18B20 - Programmable Resolution 1-Wire Digital Thermometer % </a>. % @end -module(onewire_ds18b20). % API -export([temp/1]). -export([read_scratchpad/1]). -export([convert/2]). -define(READ_SCRATCHPAD, 16#BE). -defin...
src/onewire_ds18b20.erl
0.629319
0.673527
onewire_ds18b20.erl
starcoder
%% The contents of this file are subject to the Mozilla Public License %% Version 1.1 (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.mozilla.org/MPL/ %% %% Software distributed under the License is distributed on an "A...
src/riak_core_priority_queue.erl
0.572364
0.45417
riak_core_priority_queue.erl
starcoder
%% ------------------------------------------------------------------- %% %% Copyright (c) 2014 Basho Technologies, Inc. All Rights Reserved. %% %% This Source Code Form is subject to the terms of the Mozilla Public %% License, v. 2.0. If a copy of the MPL was not distributed with this %% file, You can obtain on...
deps/exometer_core/src/exometer_histogram.erl
0.786991
0.568955
exometer_histogram.erl
starcoder
%%%============================================================================= %% Copyright 2012- Klarna AB %% Copyright 2015- AUTHORS %% %% 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 %%...
src/jesse_database.erl
0.71413
0.475423
jesse_database.erl
starcoder
-module(recursiontail). -export([fib/1,fib/3,perfect/1,isperfect/3]). %% Step 01.21: %% 1. Define a function fib/3 - to compute Fibonacci numbers - using tail recursion. %% 2. "Define a function perfect/1 that takes a positive number N and returns a boolean which indicates whether or not the number is perfect." %% As...
futurelearn-2017/recursiontail.erl
0.605449
0.750701
recursiontail.erl
starcoder
%%%------------------------------------------------------------------- %%% @doc %%% A set of optics specific to maps. %%% @end %%%------------------------------------------------------------------- -module(optic_maps). %% API -export([all/0, all/1, keys/0, keys/1, values/0, ...
src/optic_maps.erl
0.635901
0.461138
optic_maps.erl
starcoder
% 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 applicable law or agreed to in writing, software % distributed under the ...
src/couch_event/src/couch_event_listener_mfa.erl
0.668772
0.435241
couch_event_listener_mfa.erl
starcoder
%% -------- TIC-TAC ACTOR --------- %% %% The TicTac actor is responsible for tracking the state of the store and %% signalling that state to other trusted actors %% %% https://en.wikipedia.org/wiki/Tic-tac %% %% This is achieved through the exchange of merkle trees, but *not* trees that %% are secure to interference -...
src/leveled_tictac.erl
0.592549
0.69817
leveled_tictac.erl
starcoder
%%% vi:ts=4 sw=4 et %%%------------------------------------------------------------------- %%% @author <NAME> <<EMAIL>> %%% @copyright 2011 Erlware, LLC. %%% @doc %%% This provides an implementation of the type ec_dictionary using %%% gb_trees as a backin %%% see ec_dictionary %%% see gb_trees %%% @end %%%-------------...
src/ec_gb_trees.erl
0.561696
0.445409
ec_gb_trees.erl
starcoder
% Copyright (c) 2017 <EMAIL> <<EMAIL>> % See LICENCE -module(ternary). % @ref https://en.wikipedia.org/wiki/Balanced_ternary -export([negate/1, add/2, subtract/2]). -export([from_integer/1, to_integer/1, from_binary/1, to_binary/1]). -define(BASE, 3). -define(is_trit(X), (X >= -1 andalso X =< 1)). negate(Trits) -...
src/ternary.erl
0.545044
0.564219
ternary.erl
starcoder
%% ------------------------------------------------------------------- %% %% Copyright (c) 2014 Basho Technologies, Inc. All Rights Reserved. %% %% This Source Code Form is subject to the terms of the Mozilla Public %% License, v. 2.0. If a copy of the MPL was not distributed with this %% file, You can obtain on...
deps/exometer_core/src/exometer_entry.erl
0.812793
0.468
exometer_entry.erl
starcoder
% 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 applicable law or agreed to in writing, software % distributed under the ...
test/easton_99_fb_56316.erl
0.752286
0.463687
easton_99_fb_56316.erl
starcoder
%% -*- coding: utf-8 -*- %% @private %% @doc The dumpsterl spec tree data structure. %% %% A spec is represented as a hierarchical tree of type classes. Nodes %% of this tree are represented as tuples: %% %% `{Class, Data, SubSpec}' %% %% <ul> %% <li> `Class' is a term (in most cases an atom) describing %% the ty...
src/ds_spec.erl
0.560854
0.519704
ds_spec.erl
starcoder
%% @copyright 2011 Zuse Institute Berlin % 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 applicable law or a...
test/histogram_rt_SUITE.erl
0.518302
0.458652
histogram_rt_SUITE.erl
starcoder
% Copyright 2018 <NAME> % % 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 applicable law or agreed to in writing, softw...
server/src/ogonek_research.erl
0.521227
0.411939
ogonek_research.erl
starcoder
%% Support for CDMI Object ID %% %% Object IDs are used to identify objects in CDMI. Object IDs are intended %% to be globally unique values that have a specific structure. The native %% format of an object ID is a variable length byte sequence with a maximum %% size of 40 bytes. This leaves an implementer up to 32 byt...
apps/crime_core/src/objectid.erl
0.629205
0.634656
objectid.erl
starcoder
-module(matrixCalculator). -export([calculate/1]). -include("results.hrl"). -record(currentHolder,{matrix, row, column, startRow, startColumn, side}). createEmptyMatrix(Side) -> Matrix = array:new(Side, fixed), array:map(fun(_,_) -> array:new(Side, fixed) end, Matrix). actual(Value, Side) -> if ...
src/erl/matrixCalculator.erl
0.51562
0.639455
matrixCalculator.erl
starcoder
%% ``The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Public License along with this software. If not, it can be %% retrieved via the world wide web at...
data/erlang/82b4e93b1e226b99ed90eb6d6944dc03_digraph_utils.erl
0.506836
0.476214
82b4e93b1e226b99ed90eb6d6944dc03_digraph_utils.erl
starcoder
-module(day15). -export([solve/0, solve_nif/0]). -dialyzer({nowarn_function, [ solve_nif/0 ]}). %% Taken from: %% https://github.com/jesperes/aoc_erlang/blob/b53a0d2475920ef7beb330536e468eac6cfd659f/src/2021/aoc2021_day15.erl#L32 %% Encoding the {X, Y} in the Seen map shaves off a good 80...
apps/aoc/src/day15.erl
0.563018
0.638666
day15.erl
starcoder
%%-------------------------------------------------------------------- %% Copyright (c) 2020-2021 DGIOT Technologies Co., Ltd. All Rights Reserved. %% %% 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 Li...
apps/dgiot/src/otp/dgiot_metrics.erl
0.532182
0.456168
dgiot_metrics.erl
starcoder
%% Copyright (c) 2013-2020 <NAME> %% %% 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 applicable law or agreed to...
src/Elixir.Luerl.New.erl
0.60871
0.414543
Elixir.Luerl.New.erl
starcoder
%%% %%% Copyright 2011, Boundary %%% %%% 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 applicable law or ag...
src/folsom_utils.erl
0.505127
0.421076
folsom_utils.erl
starcoder
%%% @author <NAME> <<EMAIL>> %%% [http://ferd.ca/] %%% @doc Regroups useful functionality used by recon when dealing with data %%% from the node. The functions in this module allow quick runtime access %%% to fancier behaviour than what would be done using recon module itself. %%% @end -module(recon_lib). -export([sli...
src/recon_lib.erl
0.540196
0.405714
recon_lib.erl
starcoder
% 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 applicable law or agreed to in writing, software % distributed under the ...
vtree/src/vtree_split.erl
0.82734
0.614828
vtree_split.erl
starcoder
% 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 applicable law or agreed to in writing, software % distributed under the ...
test/easton_shapes.erl
0.653238
0.494385
easton_shapes.erl
starcoder
%%============================================================================== %% Copyright 2015 Erlang Solutions Ltd. %% Licensed under the Apache License, Version 2.0 (see LICENSE file) %%============================================================================== -module(amoc_user). %% defaults -define(REPEAT_I...
src/amoc_user.erl
0.52756
0.446314
amoc_user.erl
starcoder
%% The contents of this file are subject to the Mozilla Public License %% Version 1.1 (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.mozilla.org/MPL/ %% %% Software distributed under the License is distributed on an "AS IS" %% b...
data/erlang/89a9eb2d725e373b6cbc5aff41282a37_gm.erl
0.638272
0.59072
89a9eb2d725e373b6cbc5aff41282a37_gm.erl
starcoder
%%------------------------------------------------------------------------------ %% Copyright 2012 FlowForwarding.org %% %% 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....
src/enetconf_fm_chunked.erl
0.582372
0.424531
enetconf_fm_chunked.erl
starcoder
%% @doc Implements a data structure for cryptographically signed transactions. %% This is the envelope around transactions to make them cryptographically safe. %% The transactions normally also have keys of the "signers" in the transaction, %% which are extracted using the signers/1 function in the respective transacti...
apps/aetx/src/aetx_sign.erl
0.692226
0.553264
aetx_sign.erl
starcoder
%% @author <NAME> <<EMAIL>> %% @copyright 2014 <NAME> %% %% @doc Utility functions for CSS processing. Also used for sanitizing HTML. %% Copyright 2014 <NAME> %% %% 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 co...
_build/default/lib/zotonic_stdlib/src/z_css.erl
0.511473
0.46223
z_css.erl
starcoder
%%% @doc %%% %%% A DogStatsD datagram module. %%% %%% @end %%% @reference %%% See <a href="https://docs.datadoghq.com/developers/dogstatsd/#datagram-format"> Datagram Format</a> -module(dogstatsc_datagram). -export([new_metrics/4, new_events/3, new_service_check/3, encode/1]). %% Metrics %...
src/dogstatsc_datagram.erl
0.621541
0.524395
dogstatsc_datagram.erl
starcoder
%%------------------------------------------------------------------------------ %% @author <NAME> <<EMAIL>> %% @doc The Ecron API module. %% %% The Ecron application executes scheduled functions. %% A list of functions to execute might be specified in the ecron application %% resource file as value of the `scheduled' ...
src/ecron.erl
0.698124
0.503357
ecron.erl
starcoder
%%% @doc %%% Random Access Memory Storage %%% %%% Memory buffers are used to store data of a configured size. When the incoming %%% data is larger than a buffer, a new one is automatically created. %%% %%% The biggest challenge here is fitting data into the correct buffer(s). %%% Instead of using 1 huge buffer fo...
src/ra_storage_memory.erl
0.535098
0.761184
ra_storage_memory.erl
starcoder
%% @doc %% A module to validate Erlang's records. %% %% The rvalidator module aims to take away the boilerplate of implementing validating functions, %% while being agnostic of the verification rules and error handling practices. %% %% This module is based on the idea that a Record should have its own verification spec...
src/rvalidator.erl
0.73678
0.64962
rvalidator.erl
starcoder
%%-------------------------------------------------------------------- %% Copyright (c) 2021 EMQ Technologies Co., Ltd. All Rights Reserved. %% %% 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 a...
src/mria_schema.erl
0.614625
0.50354
mria_schema.erl
starcoder
%%% @author <NAME> <<EMAIL>> %%% [http://ferd.ca/] %%% @doc %%% `recon_trace' is a module that handles tracing in a safe manner for single %%% Erlang nodes, currently for function calls only. Functionality includes: %%% %%% <ul> %%% <li>Nicer to use interface (arguably) than `dbg' or trace BIFs.</li> %%% <li>P...
src/deps/recon/src/recon_trace.erl
0.503418
0.447943
recon_trace.erl
starcoder
% 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 applicable law or agreed to in writing, software % distributed under the ...
src/couch_replicator/src/json_stream_parse.erl
0.63341
0.753104
json_stream_parse.erl
starcoder
-module(bloom). %% API exports -export([ new/2, new_manual/2, add/2, exists/2, union/2, intersection/2, difference/2, optimal_params/2 ]). -export_type([bloom_state/0]). -define(BLOCK, 32). -record(bloom_state, {state :: binary(), width :: pos_integer(), rounds :: pos_integer()}). -opaque bloom_state() :: #...
src/bloom.erl
0.613931
0.497253
bloom.erl
starcoder
% @copyright 2012 Zuse Institute Berlin % 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 applicable law or a...
test/mathlib_SUITE.erl
0.729134
0.46217
mathlib_SUITE.erl
starcoder
%% ===================================================================== %% @copyright 2011 <NAME> %% @author <NAME> <<EMAIL>> %% @end %% ===================================================================== %% %% @doc stat - simple statistical function. Currently, this module %% provides an <code>accum</code> funct...
lib/stat.erl
0.621426
0.624565
stat.erl
starcoder
%%%------------------------------------------------------------------------ %% Copyright 2018, OpenCensus Authors %% 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/...
src/oc_stat_aggregation.erl
0.741768
0.510985
oc_stat_aggregation.erl
starcoder
%%% ========================================================================== %%% ep_paper_stock.erl %%% @author <NAME> %%% @copyright 2018 <NAME> %%% @version .01 %%% @doc %%% License: %%% File: ep_paper_stock.erl %%% Description: Standard paper stock dimensions %%% @end %%% ==================...
src/media/ep_paper_stock.erl
0.503662
0.404449
ep_paper_stock.erl
starcoder
%% @author <NAME> <<EMAIL>> %% @copyright 2021 <NAME> %% @doc Fetch data from URLs. Interfaces to z_url_fetch and z_url_metadata. %% 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 %% %% h...
apps/zotonic_core/src/support/z_fetch.erl
0.519034
0.478529
z_fetch.erl
starcoder
%% @doc Utility module for working with compressed and compact ECC keys. %% %% The "compact" set of routines check whether NIST P-256 (secp256r1) ECC keys %% can be compressed to only their X coordinate. This implementation %% implements the strategy described in %% [https://tools.ietf.org/html/draft-jivsov-ecc-compact...
src/ecc_compact.erl
0.560734
0.413418
ecc_compact.erl
starcoder
-module(eql). -export([ compile/1 , compile/2 , compile/3 , new_tab/1 , get_query/2 , get_query/3 ]). %% a query is either a binary string or a list of binary strings and atoms %% the atoms are replaced during `get_query` with the provided parameters %% resulting in an i...
src/eql.erl
0.537041
0.457561
eql.erl
starcoder
% @copyright 2007-2011 Zuse Institute Berlin % 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 applicable law ...
src/mathlib.erl
0.731346
0.441824
mathlib.erl
starcoder
-module(slacker_reaction). -include("spec.hrl"). -export([add/3, get/2, list/2, remove/3]). %% @doc Add a reaction for an item at a given timestamp. %% %% Options can be: %% file: file to add reaction to %% file_comment: file comment to add reaction to %% channel: channel where the message to add reaction to was po...
src/slacker_reaction.erl
0.562056
0.489931
slacker_reaction.erl
starcoder
-module(prop_tchannel_conn). -include_lib("proper/include/proper.hrl"). %% @doc Checks if TCP stream receiver can receive arbitrarily-cutoff packets. %% %% 1. Construct many valid length + payload packets. Merge them. %% 2. Split the result to arbitrary chunks. %% 3. Pass the list through tchannel_conn:stream_recv/2...
test/prop_tchannel_conn.erl
0.545044
0.489503
prop_tchannel_conn.erl
starcoder