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
%% 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/inifile.erl
0.604282
0.411998
inifile.erl
starcoder
%% Copyright 2018 Octavo Labs AG Zurich Switzerland (https://octavolabs.com) %% %% 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 %% %% Unl...
src/backends/vmq_discovery_k8s.erl
0.548794
0.404125
vmq_discovery_k8s.erl
starcoder
%% %% %CopyrightBegin% %% %% Copyright Ericsson AB 2018-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/compiler/src/beam_ssa_type.erl
0.657209
0.4184
beam_ssa_type.erl
starcoder
%% %% Copyright (c) 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 %% %% Unl...
src/trcb_exp_local_experiments_support.erl
0.50708
0.40116
trcb_exp_local_experiments_support.erl
starcoder
%% @doc Size-constrained leftist tree %% Inspired by <a href="http://www.cise.ufl.edu/~sahni/cop5536/powerpoint/lec11.ppt">Leftist Trees</a> by <NAME>. %% %% The purpose of this module is to efficiently store a limited number of %% values in e.g. a lossy histogram (ex. {@link exometer_slot_slide}). The %% complexity of...
_build/default/lib/exometer_core/src/exometer_shallowtree.erl
0.723212
0.684518
exometer_shallowtree.erl
starcoder
% -*- indent-tabs-mode:nil; -*- %%%------------------------------------------------------------------- %%% @author <NAME> <<EMAIL>> %%% @copyright (C) 2020, <NAME> %%% @doc %%% %%% Solve the 8 queens puzzle concurrently using tuple space. %%% %%% The chessboard is represented as a `map' of `Row=>Col' %%% elements. Rows...
queens/src/queens8.erl
0.508544
0.592372
queens8.erl
starcoder
%% %% Copyright (c) 2015-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 License at %% %% http://www.apache.org/licenses/LICENSE-2.0 %% %...
_build/default/lib/types/src/causal_context.erl
0.638272
0.411288
causal_context.erl
starcoder
-file("elm_core/src/basics.erlt", 1). -module(basics). -eqwalizer_unchecked([]). -export([add/2, add/1, sub/1, mul/2, mul/1, idiv/1]). -export([eq/2, eq/1, neq/2, neq/1]). -export_type([order/0]). -export([lt/2, lt/1, gt/2, gt/1, le/2, le/1, ge/2, ge/...
tests/elm_core/ir-spec/basics.erl
0.520253
0.435902
basics.erl
starcoder
%% ------------------------------------------------------------------- %% %% Copyright (c) 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 obtain ...
deps/yokozuna/src/yz_index.erl
0.630002
0.464355
yz_index.erl
starcoder
%% Copyright (c) 2013-2019 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 at %% %% http://www.apache.org/licenses/LICENSE-2.0 %% %% Unles...
src/emqx_pmon.erl
0.627723
0.413773
emqx_pmon.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/ekka_rlog_tab.erl
0.516108
0.446374
ekka_rlog_tab.erl
starcoder
%% ------------------------------------------------------------------- %% %% Copyright (c) 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 L...
test/tricks_discovery_manager_SUITE.erl
0.588534
0.628692
tricks_discovery_manager_SUITE.erl
starcoder
%%-------------------------------------------------------------------- %% Copyright (c) 2020 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...
test/estatsd_SUITE.erl
0.552057
0.446977
estatsd_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/mem3/src/mem3_reshard_validate.erl
0.631822
0.422862
mem3_reshard_validate.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_config_writer.erl
0.556159
0.473536
couch_config_writer.erl
starcoder
%% ------------------------------------------------------------------- %% %% Copyright (c) 2015 Helium Systems, 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 obtain %% a...
test/metadata_SUITE.erl
0.573081
0.423339
metadata_SUITE.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_ets.erl
0.549761
0.410697
ot_span_ets.erl
starcoder
%%% %%% Copyright 2020 RBKmoney %%% %%% 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 agr...
test/machinegun_hay_metric_SUITE.erl
0.509764
0.416737
machinegun_hay_metric_SUITE.erl
starcoder
%% ------------------------------------------------------------------- %% %% Copyright (c) 2015 Helium Systems, 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 obtain %% a...
test/cluster_membership_SUITE.erl
0.533641
0.447038
cluster_membership_SUITE.erl
starcoder
%%%------------------------------------------------------------------- %% @author <NAME> <<EMAIL>> %% @copyright (C) 2017, <NAME> %% @doc erl_knearest_neighbor.erl %% K-nearest neighbors classifies a datapoint to the class of %% its nearest neighbors among previous data. %% K-nearest neighbors is lazy and requires to t...
erl_knearest_neighbor/erl_knearest_neighbor.erl
0.683525
0.734881
erl_knearest_neighbor.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_ring_size.erl
0.66236
0.451689
riaknostic_check_ring_size.erl
starcoder
%%%------------------------------------------------------------------------------ %%% @copyright (c) 2012, DuoMark International, Inc. All rights reserved %%% @author <NAME> <<EMAIL>> %%% @doc %%% A cache implemented using a process dictionary to manage an index %%% of data where each datum is a separate erlang ...
apps/examples/esp_cache/src/esp_cache.erl
0.531696
0.412323
esp_cache.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 ...
test/prop_causal_context.erl
0.574156
0.410372
prop_causal_context.erl
starcoder
-module(gleam_stdlib). -include_lib("eunit/include/eunit.hrl"). -export([should_equal/2, should_not_equal/2, should_be_ok/1, should_be_error/1, atom_from_string/1, atom_create_from_string/1, atom_to_string/1, map_get/2, iodata_append/2, iodata_prepend/2, identity/1, decode_int/1, decode_bool...
src/gleam_stdlib.erl
0.504394
0.47244
gleam_stdlib.erl
starcoder
%% Copyright (c) 2008-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...
src/erlog_file.erl
0.536799
0.432842
erlog_file.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_SUITE.erl
0.621426
0.403038
histogram_SUITE.erl
starcoder
-module(openapi_image_image_face_bluring_api). -export([apply_image_image_face_bluring_post/2, apply_image_image_face_bluring_post/3, get_versions_image_image_face_bluring_get/1, get_versions_image_image_face_bluring_get/2]). -define(BASE_URL, ""). %% @doc Apply model for the face-bluring task for a given m...
clients/erlang-client/src/openapi_image_image_face_bluring_api.erl
0.535341
0.401981
openapi_image_image_face_bluring_api.erl
starcoder
% % Copyright (c) 2016-2017 <NAME> <<EMAIL>> % All rights reserved. % Distributed under the terms of the MIT License. See the LICENSE file. % -module(lorawan_utils). -export([index_of/2]). -export([precise_universal_time/0, ms_diff/2, datetime_to_timestamp/1, apply_offset/2]). -export([throw_info/2, throw_warning/2, t...
src/lorawan_utils.erl
0.625667
0.499512
lorawan_utils.erl
starcoder
%%% @doc Abstraction layer for accessing persistant storage. Called %%% cold-storage by the gang. Also defines the behavior of the callback %%% modules. %%% %%% For convience sake, data handled by this module (and by extension the %%% backend modules) should conform to the following format: %%% %%% `{RecordAtom, IdFiel...
apps/pre_data/src/pre_data.erl
0.570451
0.411613
pre_data.erl
starcoder
-module(assignment). -export([perimeter/1, area/1, enclose/1, bits/1]). -include_lib("eunit/include/eunit.hrl"). %%%%%%%% % 1.24 % %%%%%%%% % Shapes % ------ % % Define a function perimeter/1 which takes a shape and returns the perimeter % of the shape. % % Choose a suitable representation of triangles, and augment p...
week1/assignment.erl
0.611266
0.83602
assignment.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_message_spec.erl
0.685423
0.426172
wsock_message_spec.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/kai_store_ets.erl
0.607081
0.42471
kai_store_ets.erl
starcoder
%%%--------------------------------------------------------------------------- %%% @doc %%% `inets'/`httpd' request handler module. %%% %%% For example of use, see {@link examples_server}. %%% %%% == Configuration == %%% %%% Obviously, `mod_xmerlrpc' needs to be added to `modules' list: %``` %Config = [ % % .....
src/mod_xmerlrpc.erl
0.554712
0.49762
mod_xmerlrpc.erl
starcoder
%% Copyright (c) 2016 <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 t...
src/any.erl
0.700997
0.543348
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 % distributed under the ...
src/couch_expiring_cache/src/couch_expiring_cache_server.erl
0.629319
0.436202
couch_expiring_cache_server.erl
starcoder
%% @doc %% BEAM friendly spinlocks for Elixir/Erlang. %% %% This module provides a very simple API for managing locks %% inside a BEAM instance. It's modeled on spinlocks, but works %% through message passing rather than loops. Locks can have %% multiple slots to enable arbitrary numbers of associated %% processes. The...
src/sleeplocks.erl
0.501953
0.409103
sleeplocks.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/wrangler_scan_with_layout.erl
0.579043
0.727304
wrangler_scan_with_layout.erl
starcoder
%% @copyright 2014-2016 <NAME> <<EMAIL>> %% %% @doc Log Message Layout Behaviour %% %% This module defines the standard interface to format log messages issued by `logi' functions %% (e.g. {@link logi:info/3}, {@link logi:warning/3}, etc). %% %% A layout instance may be installed into a channel along with an associated...
src/logi_layout.erl
0.680348
0.517388
logi_layout.erl
starcoder
%% @doc %% Load data from files. Data files are Erlang terms. %% @end -module(dby_load). % load identifiers and links from files. -export([load/2, load/3, dirload/2, dirload/3]). % ------------------------------------------------------------------------------ % API functions % -----------...
src/dby_load.erl
0.513425
0.517205
dby_load.erl
starcoder
%% %% %CopyrightBegin% %% %% Copyright Ericsson AB 2018-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/beam_ssa_funs.erl
0.621541
0.477615
beam_ssa_funs.erl
starcoder
%%% @hidden %%% @doc Riak store implementation. %%% <u>Implementation Notes:</u> %%% <ul> %%% <li> Riak Data Types as main structures to push/pull data.</li> %%% <li> Bulk operations (such as: delete_all and find_all) were %%% optimized using streaming. Records are streamed in portions %%% (using Riak 2i to s...
src/sumo_store_riak.erl
0.508056
0.496399
sumo_store_riak.erl
starcoder
%% @author <NAME> <<EMAIL>> %% @copyright 2014 <NAME> %% @version 0.2.0 %% %% @doc %% %% The HDR histogram library is an Erlang native interface function wrapper of %% Mike Barker's C port of Gil Tene's HDR Histogram utility. %% %% %% A high dynamic range histogram is one that supports recording and analyzing %% sample...
src/hdr_histogram.erl
0.5769
0.476701
hdr_histogram.erl
starcoder
%% %% Copyright 2013, <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 appli...
src/ecapnp_schema.erl
0.549882
0.467636
ecapnp_schema.erl
starcoder
%% @doc Simple Moving Average %% %% [https://en.wikipedia.org/wiki/Moving_average#Simple_moving_average] %% %% This module implements SMA calculation logic. The same way as folsom does for EMA %% See [https://github.com/boundary/folsom/blob/8914823067c623d2839ecd6d17785ba94ad004c8/src/folsom_ewma.erl] %% %% see the des...
src/metric_sma.erl
0.851181
0.618752
metric_sma.erl
starcoder
%% Copyright (c) 2016 <NAME> <<EMAIL>> %% Copyright (c) 2019 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 at %% %% http://www.apache.or...
src/esockd_cidr.erl
0.629661
0.431165
esockd_cidr.erl
starcoder
-module(eministat_analysis). -include("eministat.hrl"). -export([outlier_variance/3]). -export([relative/3]). %% -- OUTLIER VARIANCE ------ %% %% @doc outlier_variance/3 computes the severity of the outlier variance %% %% http://www.ellipticgroup.com/misc/article_supplement.pdf %% %% @end outlier_variance(_, Sigma, ...
src/eministat_analysis.erl
0.530723
0.503296
eministat_analysis.erl
starcoder
%%%------------------------------------------------------------------- %%% @author <NAME> <<EMAIL>> %%% @copyright (C) 2019, <NAME> %%% @doc %%% %%% A set of utility functions to support the rest of the espace %%% modules. %%% %%% When `espace' instances are started, a number of instance specific %%% `persistent_term' ...
src/espace_util.erl
0.546254
0.562898
espace_util.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.erl
0.554229
0.470919
Elixir.Luerl.erl
starcoder
%%%============================================================================= %%% @copyright (C) 2018, <NAME> %%% @doc %%% ADT for keeping the state of State Channels %%% @end %%%============================================================================= -module(aesc_state_tree). %% API -export([commit_to_db/1...
apps/aechannel/src/aesc_state_tree.erl
0.611962
0.417242
aesc_state_tree.erl
starcoder
%%============================================================================== %% Text Manipulation Functions %%============================================================================== -module(els_text). -export([ last_token/1 , line/2 , line/3 , range/3 , tokens/1 ]). ...
apps/els_core/src/els_text.erl
0.51562
0.510619
els_text.erl
starcoder
%%%------------------------------------------------------------------- %%% @author <NAME> %%% @copyright (C) 2019 ACK CYFRONET AGH %%% This software is released under the MIT license %%% cited in 'LICENSE.txt'. %%% @end %%%------------------------------------------------------------------- %%% @doc %%% Module that allo...
src/traverse/traverse.erl
0.566738
0.509459
traverse.erl
starcoder
%% The fun_chain parse transform. See README.md for usage -module(fun_chain). -export([parse_transform/2]). parse_transform(ParseTree, _Options) -> deep_walk(ParseTree). % Top level function -> here we have to report error if we have any. deep_walk({function, _, _, _, _} = FunctionDeclaration) -> result_or_error(d...
src/fun_chain.erl
0.612078
0.62289
fun_chain.erl
starcoder
%%% Copyright 2010-2013 <NAME> <<EMAIL>>, %%% <NAME> <<EMAIL>> %%% and <NAME> <<EMAIL>> %%% %%% This file is part of PropEr. %%% %%% PropEr is free software: you can redistribute it and/or modify %%% it under the terms of the GNU General Public License as published by %%% the Free So...
_build/default/lib/proper/src/proper_statem.erl
0.619011
0.414662
proper_statem.erl
starcoder
%%% %%% Copyright 2017 RBKmoney %%% %%% 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 agr...
src/mg_core_dirange.erl
0.624866
0.482917
mg_core_dirange.erl
starcoder
%% Adapted from https://github.com/eproxus/unite/blob/master/src/unite_compact.erl -module(eunit_formatter). -behaviour(eunit_listener). % EUnit Callbacks -export([start/0]). -export([start/1]). -export([init/1]). -export([handle_begin/3]). -export([handle_end/3]). -export([handle_cancel/3]). -export([terminate/2]). ...
src/eunit_formatter.erl
0.535827
0.495911
eunit_formatter.erl
starcoder
-module(q46_50). -export([ table/1, table/2, perm/2, gray/1, huffman/1 ]). -compile(export_all). %% Auxiliary functions. and_(true, true) -> true; and_(_, _) -> false. or_(false, false) -> false; or_(_, _) -> true. nand_(A, B) -> not and_(A, B). nor_(A, B) -> not or_(A, B). xor_(A,A) -> false; xor_(...
q46_50.erl
0.506347
0.720805
q46_50.erl
starcoder
%% --- Day 6: Probably a Fire Hazard --- %% %% Because your neighbors keep defeating you in the holiday house %% decorating contest year after year, you've decided to deploy one %% million lights in a 1000x1000 grid. %% %% Furthermore, because you've been especially nice this year, Santa %% has mailed you instructions ...
src/day6.erl
0.599485
0.811078
day6.erl
starcoder
%%% gm %%% %%% Functions for interacting with GraphicsMagick -module(gm). -export([ identify_explicit/2, identify/2, convert/3, mogrify/2 ]). %% ===================================================== %% API %% ===================================================== %% Expl...
src/gm.erl
0.531696
0.402803
gm.erl
starcoder
%% Simple "QOI - Quite Okay Image" format. %% %% Based on https://github.com/phoboslab/qoi. %% %% Terminology: %% %% * Pixel: 3 or 4 8-bit bytes, stored as a `binary()`, either on its %% own or as part of a larger binary. %% %% * Channels: Number of bytes per pixel. Three (Red, Green, Blue), %% ...
src/eqoi.erl
0.591723
0.628878
eqoi.erl
starcoder
%% %% %CopyrightBegin% %% %% Copyright Ericsson AB 2000-2012. All Rights Reserved. %% %% 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 Licens...
dependencies/otp/17.1/lib/et/src/et.erl
0.700485
0.563738
et.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/...
test/prop_period_or_count.erl
0.603932
0.491456
prop_period_or_count.erl
starcoder
%%%------------------------------------------------------------------- %%% @author <NAME> %%% @copyright (C) 2017, <<NAME>> %%% @doc %%% %%% @end %%% Created : 07. Feb 2017 6:08 PM %%%------------------------------------------------------------------- -module(q_time). -author("madalin"). -include_lib("q/include/q.hrl"...
src/time/q_time.erl
0.589953
0.413714
q_time.erl
starcoder
%%-------------------------------------------------------------------- %% Copyright (c) 2021-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 Lice...
test/mria_proper_mixed_cluster_suite.erl
0.663342
0.427546
mria_proper_mixed_cluster_suite.erl
starcoder
%% %% Copyright (c) dushin.net %% 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 %% %% Unless required by applic...
src/bme280.erl
0.717408
0.61273
bme280.erl
starcoder
%% %% Copyright (c) 2012 - 2013, <NAME> %% Copyright (c) 2012 - 2013, <NAME> %% 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.apa...
examples/pincode/src/pincode.erl
0.560974
0.40539
pincode.erl
starcoder
%% @doc The payment_stream module provides utilities for dealing with %% streams of payments. %% %% == Payment Streams == %% %% A <i>payment</i> is a tuple `{amount, date}' consisting of %% an amount (in whatever currency) and a date. The amount can be %% positive or negative. %% %% For example, `{-2000, {2015, 1, 1}}'...
src/payment_stream.erl
0.782995
0.680759
payment_stream.erl
starcoder
% Contains any functions not related to raft or kv store % -module(nilva_helper). -include_lib("eunit/include/eunit.hrl"). -export([getUniformRand/2, getUniformRandInt/2]). -export([spawn_and_get_result/1]). %% ========================================================================= %% Public Functions %% ========...
src/nilva_helper.erl
0.654343
0.573081
nilva_helper.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...
apps/opentelemetry/src/otel_sampler_parent_based.erl
0.617167
0.444625
otel_sampler_parent_based.erl
starcoder
%%-------------------------------------------------------------------- %% Copyright (c) 2019 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/ekka_ring.erl
0.609757
0.451992
ekka_ring.erl
starcoder
%%------------------------------------------------------------------------------ %% @doc This OTP application is used for crawling websites while respecting `robots.txt'. %% %% This module exposes some high level functions to be able to add new crawlers and start/stop them. %% %% While most of the configuration is per ...
src/treewalker.erl
0.54577
0.426441
treewalker.erl
starcoder
-module(slacker_group). -include("spec.hrl"). -export([archive/2, close/2, create/2, create_child/2, history/3, info/2, invite/3, kick/3, leave/2, list/2, mark/3, open/2, rename/3, set_purpose/3, set_topic/3, unarchive/2]). %% @doc Archives a private group. -spec archive(Token :: string(), Channel...
src/slacker_group.erl
0.530723
0.447762
slacker_group.erl
starcoder
%%% %%% Copyright (c) 2016 The Talla Authors. All rights reserved. %%% Use of this source code is governed by a BSD-style %%% license that can be found in the LICENSE file. %%% %%% ----------------------------------------------------------- %%% @author <NAME> <<EMAIL>> %%% @doc Math API. %%% @end %%% ------------------...
src/onion_math.erl
0.663342
0.490663
onion_math.erl
starcoder
% % This file is part of AtomVM. % % Copyright 2019-2022 <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...
libs/estdlib/src/io_lib.erl
0.619817
0.42925
io_lib.erl
starcoder
%% ------------------------------------------------------------------- %% %% merkerl: simple in-memory Merkle Trees %% %% Copyright (c) 2007-2010 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 %% excep...
src/merkerl.erl
0.526343
0.610657
merkerl.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_slot_slide.erl
0.681833
0.601769
exometer_slot_slide.erl
starcoder
%%% @author <NAME> %%% @doc Lazily-evaluated iterables for Erlang %%% @end -module(streams). -compile([{inline, [{lazily, 2}, {id, 1}]}]). %% API exports %% Stream transformers -export([ append/2, chunk/2, cycle/1, drop/2, drop_while/2, filter/2, filter_map/2, flat_map/2, group_by/...
extra/streams.erl
0.57081
0.537041
streams.erl
starcoder
%% A "Final" higher order abstract syntax representation in Erlang. %% http://okmij.org/ftp/tagless-final/index.html %% https://en.wikipedia.org/wiki/Higher-order_abstract_syntax %% %% The main purpose of this abstraction is to implement the compiler %% for a pure dataflow language. %% %% The side effect needed to thr...
src/dsl.erl
0.58261
0.707455
dsl.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 %%% distri...
src/subrect.erl
0.741112
0.448668
subrect.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/common/couchdb_uuids.erl
0.689828
0.597373
couchdb_uuids.erl
starcoder
%% %% Copyright (c) 2015-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 License at %% %% http://www.apache.org/licenses/LICENSE-2.0 %% %...
_build/default/lib/types/src/state_gmap.erl
0.685634
0.438845
state_gmap.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/ej_merge.erl
0.523664
0.441914
ej_merge.erl
starcoder
%% Use this module to run some basic query against the chain %% For example: %% %% - Lookup last 500 blocks for payment_v2 transactions: %% lookup_txns_by_type(500, blockchain_txn_payment_v2). %% %% - Lookup last 500 blocks for particular txn hash: %% lookup_txns_by_type(500, <<some_txn_hash>>). -module(miner_query). ...
src/miner_query.erl
0.54577
0.575439
miner_query.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/log_recovery_SUITE.erl
0.53048
0.468487
log_recovery_SUITE.erl
starcoder
%% %% %CopyrightBegin% %% %% Copyright Ericsson AB 2019. 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_digraph.erl
0.59796
0.449272
beam_digraph.erl
starcoder
%% @author <NAME> <<EMAIL>> %% @copyright 2009-2010 <NAME> %% %% @doc Module for rendering and caching scomps. Scomps can be caching and %% non caching, depending on the passed arguments and the results of the %% scomp's varies/2 function. %% Copyright 2009-2010 <NAME> %% %% Licensed under the Apache Licens...
apps/zotonic_core/src/support/z_scomp.erl
0.546012
0.439507
z_scomp.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_measure.erl
0.756897
0.512998
oc_stat_measure.erl
starcoder
%% @doc Edmonds-Karp / Ford-Fulkerson Algorithms %% %% <p>Calculates the Maximum Flow in a Network (Directed Graph)</p> %% %% <p>For examples you can check the <code>flow_demo</code> module.</p> %% -module(edmonds_karp). -export([run/4]). -type mode() :: bfs | dfs. %% =============================================...
src/edmonds_karp.erl
0.605682
0.479077
edmonds_karp.erl
starcoder
% Copyright 2011, Dell % % 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, s...
crowbar_framework/BDD/bdd_selftest.erl
0.558327
0.533701
bdd_selftest.erl
starcoder
% @doc OTPCL interpreter/evaluator. % % OTPCL's interpreter effectively revolves around repeatedly calling % 2-arity functions ("commands"), the first argument being the actual % list of arguments for that function/command, and the second being % the current interpretation state (expressed as a tuple of two maps, % one...
src/otpcl_eval.erl
0.703651
0.615131
otpcl_eval.erl
starcoder
%% vi:ts=4 sw=4 et %% @copyright <NAME> %% @doc Format dates in erlang %% %% Licensed under the MIT license %% %% This module formats erlang dates in the form {{Year, Month, Day}, %% {Hour, Minute, Second}} to printable strings, using (almost) %% equivalent formatting rules as http://uk.php.net/date, US vs %% European ...
src/ec_date.erl
0.526099
0.452475
ec_date.erl
starcoder
-module(fd_sched_rapos). %% This is the algorithm from paper: %% Effective random testing of concurrent programs. In proceeding ASE '07. <NAME>. %% The original RAPOS schedules a program in batch, which is tricky to %% implement in our framework. Instead, our implementation generatively %% schedules the `batch` by pi...
src/fd_sched_rapos.erl
0.514888
0.493042
fd_sched_rapos.erl
starcoder
% @copyright 2010-2014 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/gossip_vivaldi_SUITE.erl
0.696578
0.454956
gossip_vivaldi_SUITE.erl
starcoder
%% %% Copyright (c) 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 %% %% Unl...
src/exp_kube_orchestration.erl
0.546012
0.417212
exp_kube_orchestration.erl
starcoder
%% ------------------------------------------------------------------- %% %% Copyright (c) 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 L...
test/tricks_driver_SUITE.erl
0.651798
0.512937
tricks_driver_SUITE.erl
starcoder
%% Copyright (c) 2008-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...
src/erlog_int.erl
0.585694
0.547887
erlog_int.erl
starcoder
-module(problem2015_03). -export([solve1/1, solve2/1]). -type move() :: $^ | $< | $> | $v. -type moves() :: [ move() ]. -type coord() :: { integer(), integer() }. -type visited_houses() :: sets:set( coord() ). -type visitation_strategy() :: fun( ( string(), coord(), visited_houses() ) -> visited_houses() ). %%% COMMO...
src/2015/problem2015_03.erl
0.541894
0.594551
problem2015_03.erl
starcoder
% @author <NAME> % @copyright 2007 <NAME> freeyourmind ++ [$@|gmail.com] % @doc plists is a drop-in replacement for module % <a href="http://www.erlang.org/doc/man/lists.html">lists</a>, % making most list operations parallel. It can operate on each element in % parallel, for IO-bound operations, on sublists in paralle...
src/plists.erl
0.694095
0.728579
plists.erl
starcoder
%%%----------------------------------------------------------------------------- %%% @doc Mempool process group consists of `N` memcells instances `M`. They have %%% all the same capacity `C`. We follow a simple rules for scaling and deciding %%% which memcell should handle the next call. %%% %%% To pick a memcell whic...
apps/blueamber_mempool/src/storage/memtissue.erl
0.61451
0.602646
memtissue.erl
starcoder
%/-------------------------------------------------------------------- %| Copyright 2019 Erisata, UAB (Ltd.) %| %| 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.or...
src/paxoid_cb_mem.erl
0.719679
0.425426
paxoid_cb_mem.erl
starcoder
-module(bingo_random). -ifdef(TEST). -include_lib("eunit/include/eunit.hrl"). -endif. -export([shuffle/1]). %% Randomly shuffle the specified List according to uniform distribution. -spec shuffle([T]) -> [T]. shuffle(List) -> shuffle(List, []). -spec shuffle([T], [T]) -> [T]. shuffle([], State) -> State; sh...
src/bingo_random.erl
0.625896
0.679518
bingo_random.erl
starcoder