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 |
|---|---|---|---|---|---|
% INSTRUCTIONS: Copy this module and modify as appropriate
% for the function this block will perform.
% Comments marked "INSTRUCTIONS:" may be deleted
% Instructions: Follow the formatting of the @doc comment block exactly as shown
% It is used for generating LinkBlox web p... | src/block_types/lblx_template.erl | 0.5 | 0.521167 | lblx_template.erl | starcoder |
-module(f64_SUITE).
-compile(export_all).
-include_lib("stdlib/include/assert.hrl").
all() ->
[
format_neg_zero,
g_big_pos_float,
g_small_neg_float,
g_close_to_zero,
g_denormalized,
g_normalized,
g_choice,
g_ryu,
g_anomalous,
g_misc
... | test/f64_SUITE.erl | 0.552781 | 0.522141 | f64_SUITE.erl | starcoder |
%% @author <NAME>
-module(euclid).
%% API exports
-export([is_even/1, is_odd/1, floor/1, ceiling/1, is_power_of_two/1]).
-export([is_perfect_square/1, modulus/2, remainder/2, power_of_two/1]).
-export([ceiling_to_power_of_two/1, gcd/1, gcd/2, lcm/1, lcm/2]).
%%=======================================================... | src/euclid.erl | 0.551091 | 0.534916 | euclid.erl | starcoder |
%% Copyright (c) 2020-2021 <NAME> <<EMAIL>>.
%%
%% Permission to use, copy, modify, and/or distribute this software for any
%% purpose with or without fee is hereby granted, provided that the above
%% copyright notice and this permission notice appear in all copies.
%%
%% THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR... | src/json_parser.erl | 0.521471 | 0.54056 | json_parser.erl | starcoder |
%%%--------------------------------------------------------------------
%%% @author <NAME>
%%% @copyright (C) 2017 ACK CYFRONET AGH
%%% This software is released under the MIT license
%%% cited in 'LICENSE.txt'.
%%% @end
%%%--------------------------------------------------------------------
%%% @doc
%%% Histogram in w... | src/modules/datastore/utils/file_popularity/time_slot_histogram.erl | 0.643441 | 0.438605 | time_slot_histogram.erl | starcoder |
-module(woody_client_metrics).
% api
-export([new/2]).
-export([delete/1]).
-export([increment_counter/1]).
-export([increment_counter/2]).
-export([decrement_counter/1]).
-export([decrement_counter/2]).
-export([update_histogram/2]).
-export([update_gauge/2]).
-export([update_meter/2]).
% -type metric() :: metrics:m... | src/woody_client_metrics.erl | 0.511229 | 0.44083 | woody_client_metrics.erl | starcoder |
%% -------------------------------------------------------------------
%% Copyright <2020> <
%% Technische Universität Kaiserslautern, Germany
%% Université Pierre et Marie Curie / Sorbonne-Université, France
%% Universidade NOVA de Lisboa, Portugal
%% Université catholique de Louvain (UCL), Belgique
%% INESC TEC,... | apps/antidote_crdt/src/antidote_crdt_secure_counter_pn.erl | 0.675551 | 0.492981 | antidote_crdt_secure_counter_pn.erl | starcoder |
-module(problem2016_01).
-export([solve1/1, solve2/1]).
-type turn() :: left | right.
-type dir() :: north | west | south | east.
-type coord() :: { integer(), integer() }.
-type pos() :: { coord(), dir() }.
-type steps() :: non_neg_integer().
-type steps_list() :: [ coord() ].
-type instruction() :: { turn(), steps()... | src/2016/problem2016_01.erl | 0.50708 | 0.662169 | problem2016_01.erl | starcoder |
%% =============================================================================
%% bondy_auth_wamp_cryptosign.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.... | apps/bondy/src/bondy_auth_wamp_cryptosign.erl | 0.543348 | 0.405596 | bondy_auth_wamp_cryptosign.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
%%
%... | src/state_twopset.erl | 0.659186 | 0.434101 | state_twopset.erl | starcoder |
-module(rfc3339).
%% Types
-export_type([year/0, month/0, day/0, date/0,
hour/0, minute/0, second/0, time/0,
fraction_unit/0, fraction/0,
datetime/0, offset/0,
error/0]).
%% API
-export([format_datetime/1, format_datetime/2,
format_local_datetime/2, for... | src/rfc3339.erl | 0.591487 | 0.491822 | rfc3339.erl | starcoder |
-module(pso).
-export([run/5]).
-type position() :: particle:position().
-type value() :: particle:value().
%% @doc
%%
%% Run `Iterations' iterations of the PSO algorithm. The position and
%% value of the best solution is returned.
%%
%% @end
-spec run(ObjectiveFun :: fun((position()) -> value()),
InitialP... | src/pso.erl | 0.589835 | 0.588121 | pso.erl | starcoder |
% Copyright (c) 2014-2015, <NAME> <<EMAIL>>
%
% Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted,
% provided that the above copyright notice and this permission notice appear in all copies.
%
% THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIM... | src/noesis_polyline.erl | 0.792304 | 0.406155 | noesis_polyline.erl | starcoder |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Copyright (c) 2022 <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 o... | src/anagram.erl | 0.588889 | 0.459379 | anagram.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.787319 | 0.415254 | jesse_lib.erl | starcoder |
%%
%% @doc Problem: given a sequence `Xs = [X1, X2,..., Xn]' of natural numbers,
%% find a linear-time algorithm to build a tree with fringe `Xs' that
%% minimises {@link cost/1. cost} function.
%%
%% The fringe of a tree is the list of labels at the leaves in left-to-right order.
%%
%% The presented {@link mincost_tre... | lib/ndpar/src/mintrees.erl | 0.724578 | 0.867485 | mintrees.erl | starcoder |
%%%-------------------------------------------------------------------
%%% @doc
%%% State Handler - This module encapsulates the `shards' state.
%%%
%%% There are different properties that have to be stored somewhere so
%%% `shards' can work properly. Remember, `shards' performs a logic on
%%% top of `ETS', for example... | src/shards_state.erl | 0.615203 | 0.472562 | shards_state.erl | starcoder |
%% @author Couchbase <<EMAIL>>
%% @copyright 2017-2020 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/kv_stats_monitor.erl | 0.615666 | 0.427098 | kv_stats_monitor.erl | starcoder |
-module(day5).
-behavior(aoc).
-export([input_type/0, parse_input/1, p1/1, p2/1]).
-type seat() :: {
Row :: non_neg_integer(),
Col :: non_neg_integer(),
Id :: non_neg_integer()
}.
input_type() -> lines.
parse_input(Lines) -> lists:map(fun seat/1, Lines).
-spec p1(Seats :: list(seat())) -> non_neg_integ... | src/day5.erl | 0.680348 | 0.616214 | day5.erl | starcoder |
-module (element_grid).
-compile(export_all).
-include_lib("wf.hrl").
reflect() -> record_info(fields, grid).
render_element(#grid_clear {}) ->
"<div class='clear'></div>\n";
render_element(Record0) ->
Record = to_grid_record(Record0),
Body = rewrite_body(lists:flatten([Record#grid.body])),
element_... | apps/nitrogen/src/elements/layout/element_grid.erl | 0.541894 | 0.59887 | element_grid.erl | starcoder |
%%% Copyright 2022 Nomasystems, S.L. http://www.nomasystems.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
%%
%% Unless required ... | test/nmaglev_SUITE.erl | 0.547706 | 0.449755 | nmaglev_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 ... | vtree/src/vtree_cleanup.erl | 0.624637 | 0.482917 | vtree_cleanup.erl | starcoder |
-module(expect).
-export([load_form/1, update_form/3, update_form/2, save_form/2,
print_diff/2, diff_form/3, run_form/2]).
%% Inspired by: https://blog.janestreet.com/testing-with-expectations/
%% Main idea:
%% - Make it trivial to add a test
%% - Diff of the expect file indicates change of meaning / error
%%... | src/expect.erl | 0.517083 | 0.488649 | expect.erl | starcoder |
%%
%% %CopyrightBegin%
%%
%% Copyright Ericsson AB 2001-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/tools/src/cover.erl | 0.50952 | 0.450299 | cover.erl | starcoder |
%%% SERESYE, an ERlang Expert SYstem Engine
%%%
%%% Copyright (c) 2005-2010, <NAME>, <NAME>
%%% All rights reserved.
%%%
%%% You may use this file under the terms of the BSD License. See the
%%% license distributed with this project or
%%% http://www.opensource.org/licenses/bsd-license.php
%%% ========================... | examples/seresyee_auto.erl | 0.626467 | 0.404802 | seresyee_auto.erl | starcoder |
%%-------------------------------------------------------------------
%%
%% Copyright (c) 2016, <NAME> <<EMAIL>>
%%
%% 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
%%
... | test/sbroker_fq_queue.erl | 0.572245 | 0.428712 | sbroker_fq_queue.erl | starcoder |
%%%----------------------------------------------------------------------------
%%% Copyright (c) 2011-2012 <NAME>
%%% Licensed under MIT license. See LICENSE file for details.
%%%
%%% File : mmtr_lib.erl
%%% Author : <NAME> <<EMAIL>>
%%% Purpose : Collection of miscellaneous helper functions used throughout the
%%... | apps/mock_market_trader/src/mmtr_lib.erl | 0.582491 | 0.484929 | mmtr_lib.erl | starcoder |
%% @doc Interleaving composition and decomposition of protocols
-module(interleave).
-compile(export_all).
-compile(nowarn_export_all).
%% @doc Protocol format
%% Notes:
%% - Recursion variables are represented as string()
%% - Actions, labels, and assertion names are represented as atom()
%% - Control branches ... | src/interleave/interleave.erl | 0.53777 | 0.698162 | interleave.erl | starcoder |
%% -------------------------------------------------------------------
%%
%% riak_core: Core Riak Application
%%
%% 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 c... | src/riak_core_capability.erl | 0.832713 | 0.46478 | riak_core_capability.erl | starcoder |
%% Copyright (c) 2011-2012 Bash<NAME>, 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 copy of the License at
%%
%% http://www.apache.org/licenses/LICENSE-2.... | src/lager_transform.erl | 0.606964 | 0.455259 | lager_transform.erl | starcoder |
%%% @copyright (C) 2016, AdRoll
%%% @doc
%%%
%%% KCL MultiLangDaemon worker (record processor) behavior.
%%%
%%% A worker has the following lifecycle:
%%%
%%% INITIALIZE -> PROCESSING -> SHUTDOWN
%%%
%%% When a shard lease has been obtained, a worker is initialized to process records
%%% appearing on... | src/erlmld_worker.erl | 0.642881 | 0.581422 | erlmld_worker.erl | starcoder |
%%
%% Join Query Node processes
%%
%% @copyright 2014-2019 UP FAMNIT and Yahoo Japan Corporation
%% @version 0.3
%% @since May, 2014
%% @author <NAME> <<EMAIL>>
%% @author <NAME> <<EMAIL>>
%%
%% @doc Join query node is implemented as independent gen_process. Join query node is
%% a state-machine realizing protocol th... | src/join_query_node.erl | 0.532911 | 0.546557 | join_query_node.erl | starcoder |
%% Copyright 2015 <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 wr... | src/fn_error.erl | 0.703549 | 0.449816 | fn_error.erl | starcoder |
% Copyright (c) 2014-2018 <NAME> aka dark_k3y
% Initial implementation was a little slow, so:
% - several optimizations approaches is heavilly based on JSONE implementation
% by Copyright (c) 2013-2016, <NAME> <<EMAIL>> (MIT LICENSE)
% see https://github.com/sile/jsone/blob/master/src/jsone_decode.erl
% for more detail... | src/erlamsa_json.erl | 0.629775 | 0.551695 | erlamsa_json.erl | starcoder |
%% Copyright (c) 2020 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 appl... | erltc/src/erlt_ast.erl | 0.543348 | 0.454109 | erlt_ast.erl | starcoder |
%%-------------------------------------------------------------------
%%
%% Copyright (c) 2015, <NAME> <<EMAIL>>
%%
%% 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/sbroker.erl | 0.656438 | 0.40589 | sbroker.erl | starcoder |
%% -------------------------------------------------------------------
%%
%% Copyright (c) 2013 <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/nksip_code_util.erl | 0.52074 | 0.463748 | nksip_code_util.erl | starcoder |
%%--------------------------------------------------------------------
%% Copyright (c) 2020-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 Lice... | apps/emqx_auto_subscribe/src/emqx_auto_subscribe_placeholder.erl | 0.562657 | 0.444263 | emqx_auto_subscribe_placeholder.erl | starcoder |
% This file is part of ecsv released under the MIT license.
% See the LICENSE file for more information.
-module(ecsv_parser).
-author("<NAME> <<EMAIL>>").
-include("ecsv.hrl").
%
% This module is the raw csv parser.
% It will expect receiving:
% - {char, Char} for each character in a csv file
% - {eof} when the fil... | src/ecsv_parser.erl | 0.590779 | 0.571288 | ecsv_parser.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_flu_filename_mgr.erl | 0.657868 | 0.456289 | machi_flu_filename_mgr.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/gproc_ps.erl | 0.518059 | 0.426142 | gproc_ps.erl | starcoder |
%%% @doc Utils module for sheldon.
%%%
%%% Copyright Erlang Solutions Ltd. 2017 <<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/licen... | src/sheldon_utils.erl | 0.547464 | 0.422028 | sheldon_utils.erl | starcoder |
%% @doc This module represents an arena process. The arena is where throwdown
%% games are executed. The arena process maintains the following pieces of
%% state:
%%
%% <ul>
%% <li>`mode': An atom describing what phase the game is in. This is help
%% isolate and identify API calls which may not be legal at certain time... | src/throwdown_arena.erl | 0.711631 | 0.450903 | throwdown_arena.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 sending multiple messages to their neighbours in
%% intervals while some ar... | src/scenarios/mongoose_mam.erl | 0.559531 | 0.44559 | mongoose_mam.erl | starcoder |
%% @author go717franciswang [https://github.com/go717franciswang]
%% @doc Peer to peer exercise in chapter 15 of the Programming Erlang book
%% @reference <a href="http://oreilly.com/catalog/9780596518189/">Erlang Programming</a>
-module(peer).
-export([start/0, connect/1, send/1, stop/0]).
-export([handle_call/3, hand... | 18/peer.erl | 0.568056 | 0.525612 | peer.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 ... | lib/hipe/opt/hipe_ultra_prio.erl | 0.529507 | 0.460713 | hipe_ultra_prio.erl | starcoder |
%% 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 one at https://mozilla.org/MPL/2.0/.
%%
%% Copyright (c) 2021-2022 VMware, Inc. or its affiliates. All rights reserved.
%%
%% @doc
%% Khepri low-level A... | src/khepri_machine.erl | 0.778481 | 0.517632 | khepri_machine.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... | src/estatsd_protocol.erl | 0.58059 | 0.467149 | estatsd_protocol.erl | starcoder |
%% @doc Shannon Entropy Algorithm
%%
%% Erlang implementation of the Shannon Entropy Algorithm:
%% https://en.wiktionary.org/wiki/Shannon_entropy
%%
%% @end
-module(shannon_entropy).
-export([calculate/1]).
%% -----------------------------------------------------------------------
%% API Functions
%% ----------------... | Algorithms/Erlang/shannon_entropy.erl | 0.693784 | 0.636523 | shannon_entropy.erl | starcoder |
% @doc `rebar3 hex build'
%
%% Builds a new local version of your package.
%%
%% By default this provider will build both a package tarball and docs tarball.
%%
%% The package and docs .tar files are created in the current directory, but is not pushed to the repository. An app
%% named foo at version 1.2.3 will be... | src/rebar3_hex_build.erl | 0.627609 | 0.408867 | rebar3_hex_build.erl | starcoder |
%%%
%%% Copyright (c) 2018, 2020 <NAME>
%%% All rights reserved.
%%% Distributed under the terms of the MIT License. See the LICENSE file.
%%%
%%% @doc
%%% SIP branch related functions
%%%
-module(ersip_branch).
-export([make/1,
make_rfc3261/1,
make_random/1,
make_key/1,
assemble/1... | src/message/ersip_branch.erl | 0.541409 | 0.401277 | ersip_branch.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/porkrind_logic.erl | 0.661267 | 0.529932 | porkrind_logic.erl | starcoder |
%%%-------------------------------------------------------------------
%%% @doc
%%% A set of optics specific to lists.
%%% @end
%%%-------------------------------------------------------------------
-module(optic_lists).
%% API
-export([all/0,
all/1,
head/0,
head/1,
tail/0,
... | src/optic_lists.erl | 0.591723 | 0.509886 | optic_lists.erl | starcoder |
%%==============================================================================
%% Copyright 2013-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://www.a... | src/plist.erl | 0.554712 | 0.420481 | plist.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... | test/mria_proper_suite.erl | 0.569613 | 0.482063 | mria_proper_suite.erl | starcoder |
%%%-------------------------------------------------------------------
%%% @author <NAME>, <NAME>
%%% @doc The general purpose of this module is to specify the different
%%% ways to process the data collected by the sensors.
%%%
%%%
%%% @end
%%%-------------------------------------------------------------------
-modul... | src/achlys_compute.erl | 0.545044 | 0.611933 | achlys_compute.erl | starcoder |
%%--------------------------------------------------------------------
%% Copyright (c) 2017-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... | apps/emqx/src/emqx_datetime.erl | 0.723016 | 0.420957 | emqx_datetime.erl | starcoder |
-module(matasano_guess).
-export([hex_single_byte_xor/1,
hex_detect_single_byte_xor/1
]).
%% Globals
% a list of the frequency scores of all the lowercase letters and space
letter_scores() ->
ValueList = [ 8.16, 1.49, 2.78, 4.25, 12.70, 2.23, 2.02,
6.09, 6.97, 0.15, 0.77... | src/matasano_guess.erl | 0.509764 | 0.439807 | matasano_guess.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_tracer.erl | 0.585338 | 0.477311 | ot_tracer.erl | starcoder |
%% -------------------------------------------------------------------
%%
%% 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
%% except in compliance with the License. You may obtain
... | deps/sidejob/src/sidejob_resource_sup.erl | 0.682362 | 0.432363 | sidejob_resource_sup.erl | starcoder |
%% -------------------------------------------------------------------
%%
%% riak_ql_inverse_distrib_fns: implementation of inverse distribution functions
%% for the query runner
%%
%% Copyright (c) 2017 Basho Technologies, Inc. All Rights Reserved.
%%
%% This file is provided to you under... | src/riak_ql_inverse_distrib_fns.erl | 0.590071 | 0.441131 | riak_ql_inverse_distrib_fns.erl | starcoder |
%%% @doc Module enacl implements bindings to the NaCl/libsodium crypto-library
%%% <p>This module implements NIF bindings to the library known as NaCl (pronounced "salt").
%%% The NaCl library provides a sane cryptographic interface to the world in an attempt to
%%% make it harder to abuse and misuse cryptographic prim... | src/enacl.erl | 0.567937 | 0.471649 | enacl.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_pipe/src/riak_pipe_v.erl | 0.746139 | 0.412944 | riak_pipe_v.erl | starcoder |
%% 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 one at https://mozilla.org/MPL/2.0/.
%%
%% Copyright (c) 2007-2020 VMware, Inc. or its affiliates. All rights reserved.
%%
-module(delegate).
%% delega... | erlang_server/_build/default/lib/rabbit_common/src/delegate.erl | 0.555435 | 0.420183 | delegate.erl | starcoder |
%%
%% Copyright (c) 2018 <NAME>
%% All rights reserved.
%% Distributed under the terms of the MIT License. See the LICENSE file.
%%
%% SIP Response common routines
%%
-module(ersip_response).
-export([target/1]).
%%%===================================================================
%%% Types
%%%====================... | src/ersip_response.erl | 0.597138 | 0.439868 | ersip_response.erl | starcoder |
%% @author <NAME> <<EMAIL>>
%% @copyright 2011 <NAME>
%% @doc Simple topological sort of tuples {item, [depends], [provides]}
%% Copyright 2011 <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 th... | apps/zotonic_core/src/support/z_toposort.erl | 0.73077 | 0.424949 | z_toposort.erl | starcoder |
%%%------------------------------------------------------------------------
%% Copyright 2019, 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/oc_sampler_period_or_count_SUITE.erl | 0.709824 | 0.422773 | oc_sampler_period_or_count_SUITE.erl | starcoder |
%%==============================================================================
%% Copyright 2010 Erlang Solutions 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.a... | src/escalus.erl | 0.600071 | 0.412944 | escalus.erl | starcoder |
%%% @author <NAME> <<EMAIL>> [http://steve.vinoski.net/]
%%% @doc MIME-Type Parser based on Joe Gregorio's mimeparse.py Python module. This module
%%% provides basic functions for handling mime-types. It can handle matching mime-types
%%% against a list of media-ranges. Comments are mostly excerpted from the ... | src/mimeparse.erl | 0.57081 | 0.406803 | mimeparse.erl | starcoder |
%%----------------------------------------------------------------
%% Copyright (c) 2020 Faceplate
%%
%% 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://w... | test/module/ecomet_bits_SUITE.erl | 0.502197 | 0.416856 | ecomet_bits_SUITE.erl | starcoder |
%%% ==========================================================================
%%% @author <NAME>
%%% @copyright 2018 <NAME>
%%% @version .01
%%% @doc
%%% License:
%%% File: ep_bezier.erl
%%% Description: Display bezier curves
%%% @end
%%% =======================================================... | src/line/ep_bezier.erl | 0.506347 | 0.414366 | ep_bezier.erl | starcoder |
%% @doc
%% A VM implementation for the {@link intcode. intcode} instruction set.
-module(intcode_server).
-include("intcode.hrl").
-export([
% GenServer specifics
init/1, handle_call/3, handle_cast/2,
% IntcodeIO implementations
push/2, poll/1, poll_or_notify/2, as_list/1,
% Start and control
start_link... | src/intcode/intcode_server.erl | 0.73173 | 0.407569 | intcode_server.erl | starcoder |
-module(complete_a_task).
-author("<NAME>").
-export([
%% prod
completion_date/2,
add_days/2,
total_weeks_to_complete/1,
total_days_to_complete/1,
work_days_to_complete/1,
days_off/1,
number_of_weeks/2,
number_of_days/2,
today/0,
%% testing
test/0
]).
%% Config %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%... | src/complete_a_task.erl | 0.592902 | 0.471588 | complete_a_task.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_set_view/src/couch_set_view_util.erl | 0.675658 | 0.600276 | couch_set_view_util.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.erl | 0.614625 | 0.474205 | oc_stat.erl | starcoder |
%%
%% @doc A collection of frequently used functions.
%% Inspired by Clojure and Haskell.
%%
-module(core).
-export([cross/2]).
-export([frequencies/1, group_by/2, inc/1, min_by/2, minfree/1, msc/1, msc2/1]).
-export([foldl1/2, zipfold/4, zipfold/5]).
-import(lists, [filter/2, map/2, max/1]).
%%
%% @doc Applies pair ... | lib/ndpar/src/core.erl | 0.605099 | 0.678587 | core.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_stream.erl | 0.549641 | 0.404096 | couch_stream.erl | starcoder |
%% Copyright 2018 Erlio GmbH Basel Switzerland (http://erl.io)
%%
%% 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 b... | apps/vmq_server/src/vmq_queue_sup_sup.erl | 0.545286 | 0.413773 | vmq_queue_sup_sup.erl | starcoder |
%% taken from http://crunchyd.com/scutil/
%% All code here is MIT Licensed
%% http://scutil.com/license.html
-module(folsom_statistics_scutil).
-export([
kendall_correlation/2
]).
-compile([export_all]).
-compile([native]).
% seems to match the value returned by the 'cor' (method="kendal") R functi... | src/folsom_statistics_scutil.erl | 0.517815 | 0.440229 | folsom_statistics_scutil.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/hocon_schema_doc.erl | 0.589126 | 0.480844 | hocon_schema_doc.erl | starcoder |
%% Copyright 2014 Erlio GmbH Basel Switzerland (http://erl.io)
%%
%% 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 b... | src/vmq_reg_sup.erl | 0.617282 | 0.461927 | vmq_reg_sup.erl | starcoder |
%% -------------------------------------------------------------------
%%
%% sms: Streaming merge sort
%%
%% Copyright (c) 2007-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
%% except in complian... | deps/riak_kv/src/sms.erl | 0.596903 | 0.555134 | sms.erl | starcoder |
%%-------------------------------------------------------------------
%%
%% Copyright (c) 2016, <NAME> <<EMAIL>>
%%
%% 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
%%
... | deps/sbroker/src/sregulator_codel_valve.erl | 0.772702 | 0.457985 | sregulator_codel_valve.erl | starcoder |
%% -------------------------------------------------------------------
%%
%% Copyright (c) 2012-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/hashtree.erl | 0.746139 | 0.548734 | hashtree.erl | starcoder |
%% Copyright (c) 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 in w... | src/luerl_new.erl | 0.561575 | 0.406597 | luerl_new.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/src/vector_orddict.erl | 0.628179 | 0.553626 | vector_orddict.erl | starcoder |
%%%
%%% A matter of time.
-module(ff_time).
-export([now/0]).
-export([to_rfc3339/1]).
-export([from_rfc3339/1]).
-export([add_interval/2]).
-export_type([timestamp_ms/0]).
-type timestamp_ms() :: integer().
-type year() :: integer().
-type month() :: integer().
-type day() :: integer().
-type hour() :: integer().
... | apps/ff_core/src/ff_time.erl | 0.505615 | 0.406391 | ff_time.erl | starcoder |
% Example of frequency server used in chapter 03 as a starting point to
% separate specif from generic behaviour
%
% compile: erlc chapter-03/01/frequency.erl
% check: dialyzer chapter-03/01/frequency.erl
%
% after compile, use: erl
% > frequency:start().
% > true
% > frequency:alocate().
% > {ok, 10}
% > frequency:alo... | chapter-03/01/frequency.erl | 0.658088 | 0.708757 | frequency.erl | starcoder |
%% -------------------------------------------------------------------
%%
%% Copyright (c) 2007-2012 Basho Technologies, Inc. All Rights Reserved.
%%
%% -------------------------------------------------------------------
-module(riak_search_schema_parser).
-export([
from_eterm/2
]).
-include("riak_s... | src/riak_search_schema_parser.erl | 0.560373 | 0.413418 | riak_search_schema_parser.erl | starcoder |
%%
%% %CopyrightBegin%
%%
%% Copyright Ericsson AB 2010-2015. 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/diameter/examples/code/server.erl | 0.555194 | 0.423041 | server.erl | starcoder |
%%==============================================================================
%% Copyright 2010 Erlang Solutions 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.a... | test/example_SUITE.erl | 0.621541 | 0.42937 | example_SUITE.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... | src/antidote_crdt_counter_pn.erl | 0.52902 | 0.418756 | antidote_crdt_counter_pn.erl | starcoder |
%% @author <NAME> <<EMAIL>>
%% @copyright 2017 <NAME>
%% @doc Matrix operation functions.
%%
%% Matrix is a 2-dimensional array, which elements stored sequentially into Erlang binary object of
%% some IEEE758 floating point data type: single float, double float, single complex or double complex.
%%
%% N... | src/nmatrix.erl | 0.74158 | 0.683538 | nmatrix.erl | starcoder |
%%% Copy of string functions from the OTP-20 string.erl module
%%% These functions are kept to keep comparisons stable and
%%% to prevent them from being unicode-aware (which could allow
%%% an attacker to slip some interesting stuff through in hostnames)
%%% even though they are being deprecated starting in OTP-21.
%%... | deps/ssl_verify_fun/src/ssl_verify_string.erl | 0.51879 | 0.596198 | ssl_verify_string.erl | starcoder |
%%
%% Query Tree process
%%
%% @copyright 2014-2019 UP FAMNIT and Yahoo Japan Corporation
%% @version 0.3
%% @since May, 2014
%% @author <NAME> <<EMAIL>>
%% @author <NAME> <<EMAIL>>
%%
%% @doc Query tree module implements process that serves as front-end
%% of query tree represented as tree of inter-connected process... | src/query_tree.erl | 0.551091 | 0.587914 | query_tree.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... | src/tricks_util.erl | 0.601125 | 0.471832 | tricks_util.erl | starcoder |
%%%===================================================================
%% @author <NAME>
%% @copyright 2016 Pundun Labs AB
%% 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.ap... | src/gb_reg_worker.erl | 0.531453 | 0.402099 | gb_reg_worker.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... | src/pique.erl | 0.629205 | 0.47591 | pique.erl | starcoder |
%
% 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, call/2]).
-compile(export_all).
%% Convert a Reia class definition into a Reia mod... | src/core/reia_class.erl | 0.539954 | 0.424591 | reia_class.erl | starcoder |
%%%-------------------------------------------------------------------
%%% @author ngunder
%%% @copyright (C) 2017, <COMPANY>
%%% @doc
%%%
%%% @end
%%% Created : 03. Dec 2017 09.42
%%%-------------------------------------------------------------------
-module(day3).
-author("ngunder").
%% --- Day 3: Spiral Memory ---
%... | src/day3.erl | 0.510985 | 0.625181 | day3.erl | starcoder |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.