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
-module(word). -export([new/2, filter/2, dictionary_size/1, cipherword/1, dictionary/1]). -record(word, {cipherword, dictionary}). %% A word has a cipherword which is a string from the ciphertext, and %% a dictionary which is just a list of plaintext binaries the %% cipherword might match, given some (possibly empty)...
src/word.erl
0.58948
0.76105
word.erl
starcoder
%% %% @doc Math functions missing in the standard math module. %% -module(maths). -author("<NAME>"). -export([log/2]). -export([egcd/2, gcd/2, lcm/2, ilog2/1, isqrt/1]). -export([crt_garner/2, crt_solver/2]). -export([mod/2, mod_exp/3, mod_inv/2, mod_linear_equation_solver/3]). -export([dot_product/2, hadamard_prod/2,...
lib/ndpar/src/maths.erl
0.651355
0.548371
maths.erl
starcoder
-module(jiffy_global). -export([ new/1, get_atom_key/1, get_atom_key/2, get_string_key/1, get_string_key/2, get_binary_key/1, get_binary_key/2, put_atom_key/2, put_string_key/2, put_binary_key/2, delete_atom_key/1, ...
src/jiffy_global.erl
0.630799
0.523725
jiffy_global.erl
starcoder
%% %% %CopyrightBegin% %% %% Copyright Ericsson AB 2001-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/compiler/src/erl_bifs.erl
0.620047
0.403391
erl_bifs.erl
starcoder
%% --------------------------------------------------------------------- %% %% Copyright (c) 2007-2013 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 ...
src/riak_cs_storage_d.erl
0.762159
0.425068
riak_cs_storage_d.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/couchdb/couch_file.erl
0.514644
0.415492
couch_file.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/totp.erl
0.67405
0.681859
totp.erl
starcoder
-module(shapes). -export([area/1, perimeter/1, bits/1, bits_tail/1, test/0]). % Here's the model of the Data Structures I've used to describe triangles, circles and rectangles % I think the triangle might be a bit verbose, having each coordinate described as a separate, nested tuple % { triangle, { {AX, AY}, {BX, ...
1.24/shapes.erl
0.517815
0.629661
shapes.erl
starcoder
%% ------------------------------------------------------------------- %% %% Copyright (c) 2012 Basho Technologies, 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 copy of the Licen...
test/verify_down.erl
0.663451
0.450118
verify_down.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/kai_connection_SUITE.erl
0.693577
0.501831
kai_connection_SUITE.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/couch_replicator_clustering.erl
0.719876
0.421254
couch_replicator_clustering.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_insert.erl
0.658088
0.527256
vtree_insert.erl
starcoder
%%%------------------------------------------------------------------- %%% @doc %%% A set of generic optics that can be applied to multiple container %%% types. %%% %%% Intended both as a convenience and to support optic creation from %%% parsed paths in optic_path. %%% %%% Because of the ambiguous types they support, ...
src/optic_generic.erl
0.559049
0.550366
optic_generic.erl
starcoder
%%%------------------------------------------------------------------------ %% Copyright 2020, 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...
apps/opentelemetry_api/src/otel_propagator_text_map.erl
0.761893
0.566438
otel_propagator_text_map.erl
starcoder
%% ------------------------------------------------------------------- %% %% Copyright (c) 2014 SyncFree Consortium. 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...
_build/default/rel/rcl_bench/lib/antidotec_pb-0.2.9/src/antidotec_datatype.erl
0.603114
0.402216
antidotec_datatype.erl
starcoder
% Copyright 2017-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, ...
src/statser_calc.erl
0.78789
0.4206
statser_calc.erl
starcoder
%%-------------------------------------------------------------------- %% Copyright (c) 2022 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...
apps/emqx_retainer/src/emqx_retainer_index.erl
0.6488
0.521167
emqx_retainer_index.erl
starcoder
%%============================================================================== %% Copyright 2020,2021 <NAME> <<EMAIL>>. %% %% 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://...
src/cryptoxs.erl
0.569853
0.429071
cryptoxs.erl
starcoder
%% --------------------------------------------------------------------- %% %% Copyright (c) 2007-2013 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 ...
src/rts.erl
0.621426
0.46873
rts.erl
starcoder
-module(ewkb). -include("epgsql_geometry.hrl"). -export([decode_geometry/1, encode_geometry/1]). -type geom_type() :: geometry | point % | line_string% | polygon% | multi_point% | multi_line_string% ...
src/ewkb.erl
0.505371
0.541773
ewkb.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_lib.erl
0.791741
0.473353
jesse_lib.erl
starcoder
%% @doc %% Counter is a Metric that represents a single numerical value that only ever %% goes up. That implies that it cannot be used to count items whose number can %% also go down, e.g. the number of currently running processes. Those %% "counters" are represented by {@link prometheus_gauge}. %% %% A Counter is typi...
src/metrics/prometheus_counter.erl
0.798854
0.55935
prometheus_counter.erl
starcoder
%% @author <NAME> <<EMAIL>> [http://yarivsblog.com] %% @version 0.9.3 %% @copyright <NAME> 2006-2007 %% %% @doc ErlTL is a simple Erlang template language. %% %% == Introduction == %% ErlTL is a template language used for creating Erlang modules that %% programatically generate iolists (nested lists of strings and/or ...
src/erltl/erltl.erl
0.558809
0.54825
erltl.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_propagation.erl
0.592549
0.412264
ot_propagation.erl
starcoder
%%% @doc Given a list of integers (the program) figure out Huffman encoding %%% for this program and the decoding tree. %%% Opcodes in the code then can be encoded using opcode frequency tree %%% (either dynamically calculated by uasm_stats or hardcoded). %%% @end -module(uasm_huffman). -export([ decode/2, encode...
Compiler.old/apps/uasm/src/uasm_huffman.erl
0.57344
0.499268
uasm_huffman.erl
starcoder
-module(solution). -export([main/0]). % this solution uses the Sparse Table algorithm from % http://www.cs.sunysb.edu/~bender/pub/JALG05-daglca.pdf main() -> {ok, [N, M]} = io:fread("", "~d~d"), LA = read_data(N), LR = read_data(2*M), A = array(LA), RMQ = rmq(A), query(LR, RMQ), true. ...
Functional Programming/Functional Structures/Range Minimum Query/solution.erl
0.550366
0.453625
solution.erl
starcoder
%%============================================================================== %% @copyright 2019-2020 Erlang Solutions Ltd. %% Licensed under the Apache License, Version 2.0 (see LICENSE file) %% @end %% %% @doc %% In this scenario, users are creating pubsub nodes and publishing items. %% Users are publishing items ...
src/scenarios/pubsub_simple.erl
0.646906
0.46952
pubsub_simple.erl
starcoder
%% ------------------------------------------------------------------- %% %% riaknostic - automated diagnostic tools for Riak %% %% Copyright (c) 2011 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 %% ...
deps/riaknostic/src/riaknostic_check.erl
0.617743
0.409103
riaknostic_check.erl
starcoder
-module(numerl). -on_load(init/0). -export([ eval/1, eye/1, zeros/2, equals/2, add/2, sub/2,mult/2, divide/2, matrix/1, rnd_matrix/1, get/3, at/2, mtfli/1, mtfl/1, row/2, col/2, transpose/1, inv/1, nrm2/1, vec_dot/2, dot/2]). %Matrices are represented as such: %-record(matrix, {n_rows, n_cols, bin}). init()-> Dir =...
src/numerl.erl
0.550607
0.531088
numerl.erl
starcoder
%% ------------------------------------------------------------------- %% %% Copyright (c) 2011 Basho Technologies, 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 copy of the Licen...
deps/riak_kv/src/riak_kv_pipe_get.erl
0.650689
0.44903
riak_kv_pipe_get.erl
starcoder
%%%============================================================================= %%% %%% | o __ _| _ __ |_ _ _ _ (TM) %%% |_ | | | (_| (/_ | | |_) (_| |_| | | | %%% %%% @copyright (C) 2015, Lindenbaum GmbH %%% %%% Permission to use, copy, modify, and/or distribute this softwa...
src/glob.erl
0.637144
0.458531
glob.erl
starcoder
%% ------------------------------------------------------------------- %% %% Copyright <2013-2018> < %% Technische Universität Kaiserslautern, Germany %% Université Pierre et Marie Curie / Sorbonne-Université, France %% Universidade NOVA de Lisboa, Portugal %% Université catholique de Louvain (UCL), Belgique %% IN...
apps/antidote_crdt/src/antidote_crdt_set_aw.erl
0.533154
0.457561
antidote_crdt_set_aw.erl
starcoder
%%% @doc Fuse implements a circuit breaker pattern for Erlang. %%% @end -module(fuse). -ifdef(PULSE). -include_lib("pulse_otp/include/pulse_otp.hrl"). -endif. -export([ ask/2, install/2, melt/1, remove/1, reset/1, run/3 ]). -export([ circuit_enable/1, circuit_disable/1 ]). -type fuse...
src/fuse.erl
0.569972
0.428233
fuse.erl
starcoder
%% @doc A method of encoding and decoding some set of Erlang %% terms to and from binaries. %% %% An #osmos_format{} record has two fields: %% <ul> %% <li>to_binary (<tt>(any()) -> binary()</tt>): convert a term to binary. %% This is not required to accept all Erlang terms.</li> %% <li>from_binary (<tt>(binary()) -...
src/osmos_format.erl
0.507324
0.44348
osmos_format.erl
starcoder
% @copyright 2008-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 ...
test/util_SUITE.erl
0.631367
0.427038
util_SUITE.erl
starcoder
%% %% %CopyrightBegin% %% %% Copyright Ericsson AB 1998-2021. 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/debugger/src/i.erl
0.529993
0.411761
i.erl
starcoder
%% @doc %% A Histogram tracks the size and number of events in buckets. %% You can use Histograms for aggregatable calculation of quantiles. %% %% Example use cases for Histograms: %% <ul> %% <li>Response latency</li> %% <li>Request size</li> %% </ul> %% %% Histogram expects `buckets` key in a metric spec. Buckets ...
src/metrics/prometheus_histogram.erl
0.794863
0.590897
prometheus_histogram.erl
starcoder
%% ------------------------------------------------------------------- %% %% riak_kv_bs_keys: Key encoding/decoding for bigsets %% %% Copyright (c) 2007-2016 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 f...
src/bigset_keys_nulls.erl
0.658637
0.462898
bigset_keys_nulls.erl
starcoder
%%%--------------------------------------------------------------------------- %%% @doc %%% Command line arguments handler. %%% %%% Module implementing this behaviour will be used for parsing arguments %%% passed in command line, decoding from them an operation to be performed %%% (usually starting daemon and s...
src/gen_indira_cli.erl
0.549641
0.521106
gen_indira_cli.erl
starcoder
%% ------------------------------------------------------------------- %% @doc Handles interaction with the GUI(s).<br/> %% This module interfaces possibly multiple external GUIs to the rest %% of the application. Each GUI has its own {@link gui_port} process. %% The functions in this module handle the delivery of upda...
src/gui/gui.erl
0.515132
0.572125
gui.erl
starcoder
%%%------------------------------------------------------------------- %%% @doc %%% A set of optics specific to proplists. %%% @end %%%------------------------------------------------------------------- -module(optic_proplists). %% API -export([all/0, all/1, keys/0, keys/1, values/0...
src/optic_proplists.erl
0.590897
0.539226
optic_proplists.erl
starcoder
%% @doc A "monad" for wrapping a value with a ordered event queue %% such that values that have diverged in history can be merged %% automatically in a predictable manner. %% %% In order to provide for an efficient serialization, old events %% can be expired with expire/2 and the event queue can be ...
src/statebox.erl
0.589835
0.576184
statebox.erl
starcoder
%% ------------------------------------------------------------------- %% %% riakc_counter: Eventually-consistent counter type %% %% Copyright (c) 2013 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 %%...
src/riakc_counter.erl
0.608827
0.435121
riakc_counter.erl
starcoder
%% %% %CopyrightBegin% %% %% Copyright Ericsson AB 1996-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/gs/examples/frac.erl
0.573201
0.456046
frac.erl
starcoder
-module(slacker_usergroup). -include("spec.hrl"). -export([create/3, disable/3, enable/3, list/2, update/3, list_users/3, update_users/4]). %% @doc Create a user group. %% %% Options can be: %% handle: mention handle %% description: short description %% channels: comma separated string of encoded channel IDs for wh...
src/slacker_usergroup.erl
0.557364
0.466785
slacker_usergroup.erl
starcoder
%% @author Couchbase <<EMAIL>> %% @copyright 2017-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_web_collections.erl
0.608012
0.44348
menelaus_web_collections.erl
starcoder
%%% vim:ts=2:sw=2:et %%%----------------------------------------------------------------------------- %%% @doc Erlang parse transform for permitting default arguments in functions %%% %%% Presently the Erlang syntax doesn't allow function arguments to have default %%% parameters. Consequently a developer needs to repl...
src/defarg.erl
0.549399
0.542136
defarg.erl
starcoder
%% ------------------------------------------------------------------- %% %% Copyright (c) 2016 <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 L...
src/conver_vis.erl
0.632503
0.430387
conver_vis.erl
starcoder
%%%============================================================================= %%% @copyright 2017, <NAME> %%% @doc %%% Common functions and behaviour for Proof of Work %%% @end %%%============================================================================= -module(aec_pow). -export([test_target/2, pick...
apps/aecore/src/aec_pow.erl
0.577614
0.514644
aec_pow.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 defi...
src/serialization/persistent_record.erl
0.512205
0.432243
persistent_record.erl
starcoder
%% @author jstypka <<EMAIL>> %% @version 1.0 %% @doc A module with evolutionary functions which transform one generation into another, including migrations. -module(emas_evolution). -export([do_reproduce/2, do_fight/2, optional_pairs/2]). -include ("emas.hrl"). -type agent() :: emas:agent(). -type sim_params() :: ema...
src/emas_evolution.erl
0.507812
0.654067
emas_evolution.erl
starcoder
%% @copyright 2013-2016 <NAME> <<EMAIL>> %% %% @doc Tuple based `hash_ring' Implementation Module %% %% This module represents a ring (i.e., virtual nodes) as a large tuple. %% %% It is superior in terms of node search efficiency and memory footprint. %% But dynamic addition and removal of nodes require O(N log N) and ...
src/hash_ring_static.erl
0.549157
0.425605
hash_ring_static.erl
starcoder
-module(linearize). -import(lists, [zip/2, zip3/3, unzip/1, unzip3/1, seq/2, nth/2]). -import(domain, [subset/2, intersection/1, intersection/2, intersect_envs/2, union/1, union/2]). -export([term/2, term/3]). -include_lib("eunit/include/eunit.hrl"). term(Term, ModuleMap) -> term(expr, Term, ModuleMap). term(expr...
src/linearize.erl
0.557604
0.537102
linearize.erl
starcoder
-module(groklib). -export([build_pattern/2, match/3, get_subpatterns/1, get_pattern_metadata/1, expand_pattern/2, escape/1, unescape/1]). -type grok_metadata() :: [{string(), atom()}]. -type exp_pattern() :: {grok_metadata(), CompiledRegExp :: re:mp()}. -export...
src/groklib.erl
0.528047
0.546859
groklib.erl
starcoder
%% @author Couchbase <<EMAIL>> %% @copyright 2011-Present Couchbase, Inc. %% %% Use of this software is governed by the Business Source License included %% in the file licenses/BSL-Couchbase.txt. As of the Change Date specified %% in that file, in accordance with the Business Source License, use of this %% software wi...
src/failover_safeness_level.erl
0.515376
0.460471
failover_safeness_level.erl
starcoder
%%%------------------------------------------------------------------- %%% @author <NAME> <<EMAIL>> %%% @copyright (C) 2019, <NAME> %%% @doc Barrier Synchronization using the Butterfly Barrier. %%% %%% A barrier allows multiple processes working on a computation to %%% sychronize with each other before proceeding to th...
barrier/src/barrier_0.erl
0.608012
0.479138
barrier_0.erl
starcoder
%% @author <NAME> %% @docfile "author.edoc" %% @doc Counts the number of different characters in the specified file using %% concurrency. %% @since 1.0.0 %% @version 1.0.0 -module(ccharcount). -export([load/1, go/2]). %% @spec load(Filename) -> list() %% @doc Reads a file and returns an analysis of its letter fre...
src/ccharcount.erl
0.634883
0.525917
ccharcount.erl
starcoder
%% ------------------------------------------------------------------- %% %% Copyright (c) 2014 SyncFree Consortium. 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 ...
test/gr_SUITE.erl
0.549157
0.489686
gr_SUITE.erl
starcoder
-module(any). -compile(no_auto_import). -include_lib("eunit/include/eunit.hrl"). -export([from/1, unsafeCoerce/1, string/1, int/1, float/1, bool/1, thunk/1, list/2, tuple/1, field/2]). list_module() -> list. tuple_module() -> tuple. from(A) -> gleam__stdlib:identity(A). unsafeCoerce(A) -> gleam__st...
gleam_stdlib/gen/any.erl
0.555435
0.680713
any.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 %%% dist...
lib/hipe/misc/hipe_segment_trees.erl
0.64131
0.560614
hipe_segment_trees.erl
starcoder
% @copyright 2018-2020 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 ...
test/autoconf_SUITE.erl
0.516352
0.432303
autoconf_SUITE.erl
starcoder
%% @doc A set of utility routines used to operate on deep proplists. %% %% This single module has been designed to hit three primary goals: %% <ll> %% <li>allow you to access deeply nested properties inside proplists;</li> %% <li>admit you to mutate proplists;</li> %% <li>allow you to access a group of properties with ...
src/deepprops.erl
0.567218
0.599954
deepprops.erl
starcoder
%% %% %CopyrightBegin% %% %% Copyright Ericsson AB 1999-2020. 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/compiler/src/v3_core.erl
0.637821
0.512205
v3_core.erl
starcoder
-module(influxdb_line_encoding). -export([ encode/1 ]). -export_type([ point/0, measurement/0, tags/0, fields/0, timestamp/0 ]). -type point() :: {measurement(), tags(), fields(), timestamp()} | {measurement(), tags(), fields()}. -type measurement() :: key(). -type tags() :: #{key() => iodata(...
src/influxdb_line_encoding.erl
0.649023
0.830319
influxdb_line_encoding.erl
starcoder
%% Copyright 2011 <NAME> <<EMAIL>> % % 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...
src/gf256.erl
0.652906
0.474814
gf256.erl
starcoder
%%%------------------------------------------------------------------------ %%% @author <NAME> <<EMAIL>> %%% @author <NAME> <<EMAIL>> %%% @copyright (C) 2015, <NAME>, <NAME> %%% @doc %%% Functions to divide mapped trees in clusters %%% @end %%% Created : 2 Jun 2015 by <NAME> %%%----------------------------------------...
src/behaviour_extraction/tree_clustering.erl
0.569853
0.616647
tree_clustering.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 ...
src/bloom.erl
0.639736
0.505859
bloom.erl
starcoder
%% (MIT License) %% %% Copyright (c) 2014 <NAME>. All rights reserved. %% %% 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 %%...
src/exs64_speed.erl
0.579638
0.40645
exs64_speed.erl
starcoder
%% ------------------------------------------------------------------- %% %% riaknostic - automated diagnostic tools for Riak %% %% Copyright (c) 2011 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 %% ...
deps/riaknostic/src/riaknostic_util.erl
0.519521
0.437283
riaknostic_util.erl
starcoder
% @copyright 2009-2011 Zuse Institute Berlin, % onScale solutions GmbH % 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....
src/paxos/acceptor_state.erl
0.611266
0.416589
acceptor_state.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/couchdb/couch_stats_collector.erl
0.531696
0.484075
couch_stats_collector.erl
starcoder
%%% @doc Merkle Tree is a data structure where every non-leaf node contains the %%% hash of the labels of its child nodes, and the leaves have their own values %%% (or key/value pair) hashed. Because of this characteristic, Merkle Trees are %%% used to verify that two or more parties have the same data without %%% exch...
src/merkletree.erl
0.747708
0.844024
merkletree.erl
starcoder
%% @doc %% Stages are data-exchange steps that send and/or receive data %% from other stages. %% %% When a stage sends data, it acts as a producer. When it receives %% data, it acts as a consumer. Stages may take both producer and %% consumer roles at once. %% %% ## Stage types %% %% Besieds taking both producer and co...
src/gen_stage.erl
0.527803
0.639638
gen_stage.erl
starcoder
%% @doc Parse CSV file into a nested list of lines and fields. %% @author <NAME> <<EMAIL>> %% Copyright 2010-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://...
apps/zotonic_core/src/csv/z_csv_parser.erl
0.513912
0.54958
z_csv_parser.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...
test/spec/wsock_framing_spec.erl
0.558207
0.455501
wsock_framing_spec.erl
starcoder
%% Copyright 2014 Opscode, Inc. All Rights Reserved. %% @doc Provides functions to parse a TSV input. %% Pretty simple format: each line should be separated by a new-line character (\n) %% On each line, fields are separated by tabs (\t). %% Fields cannot contain tabs. %% Accepts strings as either lists or binaries (an...
components/automate-workflow-server/apps/delivery/src/tsv_parser.erl
0.734024
0.572723
tsv_parser.erl
starcoder
%% -*- coding: utf-8 -*- %% ------------------------------------------------------------------- %% %% riak_kv_gcounter: A state based, grow only, convergent counter %% %% Copyright (c) 2007-2013 Basho Technologies, Inc. All Rights Reserved. %% %% This file is provided to you under the Apache License, %% Version 2.0 (t...
deps/riak_kv/src/riak_kv_gcounter.erl
0.506103
0.476336
riak_kv_gcounter.erl
starcoder
% @copyright 2013-2015 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/proto_sched.erl
0.569254
0.522629
proto_sched.erl
starcoder
%% @author <NAME> (n3053620) %% @copyright 2015 <NAME> %% @version 1.0 %% @doc %% This module provides functionality to validate a connection of a client against the client list. %% Certain functions will also perform an action upon validating a connection. -module (validation). -include ("server.hrl"). -export ([ch...
Source/Server/src/validation.erl
0.582729
0.433562
validation.erl
starcoder
-module(pgo_datetime_SUITE). -compile(export_all). -include_lib("common_test/include/ct.hrl"). -include_lib("stdlib/include/assert.hrl"). all() -> [select, insert, interval]. init_per_suite(Config) -> application:ensure_all_started(pgo), {ok, _} = pgo_sup:start_child(default, #{pool_size => 1, ...
test/pgo_datetime_SUITE.erl
0.591251
0.579519
pgo_datetime_SUITE.erl
starcoder
-module(example_curve). -author('<NAME> <<EMAIL>>'). -behaviour(digeno_callback). %% digeno callback functions -export([get_config/0, generate/0, evaluate/1, fitness/2, dead_on_arrival/2, mutate/1, combine/2, format/1, format_result/1]). %% This ...
src/example_curve.erl
0.506347
0.749821
example_curve.erl
starcoder
%%% vim:ts=2:sw=2:et %%%----------------------------------------------------------------------------- %%% @doc Erlang pipeline parse transform %%% %%% This transform implements a parser syntax extension that enables application %%% of cascading function calls using the `/' operator. %%% %%% In the `LHS / RHS / ... Last...
src/erlpipe.erl
0.657538
0.613989
erlpipe.erl
starcoder
%% @author <NAME> <<EMAIL>> %% @copyright 2021 <NAME> %% @doc Calculate the ImageMagick distortion parameters for a 3D rotation. %% Copyright 2021 <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...
apps/zotonic_core/src/support/z_media_rotate3d.erl
0.704668
0.672587
z_media_rotate3d.erl
starcoder
%%% @doc %%% An implementation of the simple grant language: https://evernym.github.io/sgl/. %%% %%% Given a rule and a list of prinicipals it will determine if the prinicpals %%% meet the requirements of the rule. %%% @end -module(sgl). -export([evaluate/2]). -type id_condition() :: {id, Id :: binary()}. -type role...
src/sgl.erl
0.5
0.4436
sgl.erl
starcoder
%% This is a simple implementation of the project, using one centralized server. %% %% It will create one "server" actor that contains all internal state (users and %% their subscriptions, channels and their messages, and logged in users). %% %% This implementation is provided with unit tests. However, these tests are ...
centralized/server_centralized.erl
0.555918
0.422147
server_centralized.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/math_pos_SUITE.erl
0.666822
0.574723
math_pos_SUITE.erl
starcoder
%% Copyright (c) Facebook, Inc. and its affiliates. %% %% 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 applicabl...
test/erlfmt_markdown_SUITE.erl
0.606848
0.746301
erlfmt_markdown_SUITE.erl
starcoder
%% @author <NAME> <<EMAIL>> %% @copyright 2018 <NAME> %% @doc Ensure a mixed rendering becomes a valid iolist. %% 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 %...
apps/zotonic_core/src/support/z_output_html.erl
0.524395
0.419886
z_output_html.erl
starcoder
%% -*- erlang -*- %% %% Basic combinatorics for Erlang lists and maps. %% %% Copyright 2016-2017 <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/lice...
src/lib_combin.erl
0.594787
0.626696
lib_combin.erl
starcoder
-module(heap_demo). -export([min_heap/0, max_heap/0]). -spec min_heap() -> ok. min_heap() -> %% Creating a new min-heap H = heap:new(min), %% Checking if heap is empty true = heap:is_empty(H), %% Adding elements {6, _R1} = heap:insert(H, 6), {9, R2} = heap:insert(H, 9), {3, _R3} = heap:insert(H, 3), ...
demo/src/heap_demo.erl
0.584745
0.421492
heap_demo.erl
starcoder
%% ============================================================================= %% bondy_router.erl - %% %% Copyright (c) 2016-2022 Leapsight. 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 o...
apps/bondy/src/bondy_router.erl
0.618089
0.410077
bondy_router.erl
starcoder
%%%------------------------------------------------------------------------ %% Copyright 2020, 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...
apps/opentelemetry_api/src/otel_propagator.erl
0.582966
0.442938
otel_propagator.erl
starcoder
% references: % https://en.wikipedia.org/wiki/Chord_(peer-to-peer) -module(chord). -export([spawn_ring/1, forward/2, lookup/2, insert/3]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2]). -behavior(gen_server). -define(M, 10). -define(MAX, round(math:pow(2, ?M))). -define(TICKINTERVAL, 100...
chord-dht/chord.erl
0.521227
0.521167
chord.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 ag...
src/histogram.erl
0.583915
0.59461
histogram.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/totp_validator.erl
0.665084
0.520801
totp_validator.erl
starcoder
%% -------- Utility Functions --------- %% %% Generally helpful funtions within leveled %% -module(leveled_util). -include("include/leveled.hrl"). -include_lib("eunit/include/eunit.hrl"). -export([generate_uuid/0, integer_now/0, integer_time/1, magic_hash/1, safe_re...
src/leveled_util.erl
0.582254
0.436202
leveled_util.erl
starcoder
%%====================================================================== %% %% Leo Commons %% %% Copyright (c) 2012-2015 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 cop...
deps/leo_commons/src/leo_mnesia.erl
0.693161
0.41253
leo_mnesia.erl
starcoder
%% @author <NAME> <<EMAIL>> %% @doc %% An Erlang implementation of a Server Wide Logical Clock, %% in this case a Bitmapped Version Vector. %% @end -module('swc_node'). -author('<NAME> <<EMAIL>>'). -ifdef(TEST). -include_lib("eunit/include/eunit.hrl"). -endif. -include_lib("swc/include/swc.hrl"). %% ...
src/swc_node.erl
0.551815
0.522507
swc_node.erl
starcoder
-module(plausible_block_SUITE). -include_lib("common_test/include/ct.hrl"). -include_lib("eunit/include/eunit.hrl"). -export([ all/0, init_per_testcase/2, end_per_testcase/2 ]). -export([ basic/1, definitely_invalid/1, ultimately_invalid/1, valid/1 ]). all() -> [basic, definitely_invalid, ul...
test/plausible_block_SUITE.erl
0.520984
0.435721
plausible_block_SUITE.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_report_lager.erl
0.655115
0.477981
exometer_report_lager.erl
starcoder