commit stringlengths 40 40 | old_file stringlengths 4 264 | new_file stringlengths 4 264 | old_contents stringlengths 0 4.24k | new_contents stringlengths 1 5.44k | subject stringlengths 14 778 | message stringlengths 15 9.92k | lang stringclasses 277
values | license stringclasses 13
values | repos stringlengths 5 127k |
|---|---|---|---|---|---|---|---|---|---|
82f99884c553182635bdd6b5db03239124c4dc4c | src/erlcfg_parser.yrl | src/erlcfg_parser.yrl | Nonterminals
assignments assignment key value data.
Terminals
integer float atom quoted_atom string bool variable '=' ';'.
Rootsymbol assignments.
assignments -> assignment ';' assignments : ['$1', '$3'].
assignments -> assignment : ['$1'].
assignments -> '$empty' : [].
assignment -> key '=' value : {set, '$1', '... | Nonterminals
assignments assignment key value data block.
Terminals
integer float atom quoted_atom string bool variable '=' ';' '{' '}'.
Rootsymbol assignments.
assignments -> assignment ';' assignments : ['$1', '$3'].
assignments -> assignment : ['$1'].
assignments -> '$empty' : [].
assignment -> key '=' value :... | Add rule to recognize a 'block' into parser definition | Add rule to recognize a 'block' into parser definition
| Erlang | bsd-3-clause | saleyn/erlcfg |
d4bf3bd18b39af4d169f00abaf4b233a066ff63e | src/oauth1_storage.erl | src/oauth1_storage.erl | -module(oauth1_storage).
-export_type(
[ error/0
]).
-export(
[ put/3
, get/2
]).
-type error() ::
not_found
| {io_error, any()}
.
-callback put(binary(), binary(), binary()) ->
hope_result:t(ok, error()).
-callback get(binary(), binary()) ->
hope_result:t(binary(), error... | -module(oauth1_storage).
-include_lib("oauth1_module_abbreviations.hrl").
-export_type(
[ error/0
]).
-export(
[ put/3
, get/2
]).
-type error() ::
not_found
| {io_error, any()}
.
-callback put(binary(), binary(), binary()) ->
hope_result:t(ok, error()).
-callback get(binary... | Remove raw call to application:get_env/2. | Remove raw call to application:get_env/2.
The last remaining one.
| Erlang | mit | ibnfirnas/oauth1_core |
658191a2d5bb17b0a896b505d186b0f7bad316f2 | src/mover_eredis_sup.erl | src/mover_eredis_sup.erl | %% -*- erlang-indent-level: 4;indent-tabs-mode: nil; fill-column: 92 -*-
%% ex: ts=4 sw=4 et
%%
%% @doc Supervisor for eredis clients.
-module(mover_eredis_sup).
-behaviour(supervisor).
-export([start_link/0]).
%% Supervisor callbacks
-export([init/1,
eredis_start_link/2
]).
-define(SERVER, ?MODULE... | %% -*- erlang-indent-level: 4;indent-tabs-mode: nil; fill-column: 92 -*-
%% ex: ts=4 sw=4 et
%%
%% @doc Supervisor for eredis clients.
-module(mover_eredis_sup).
-behaviour(supervisor).
-export([start_link/0]).
%% Supervisor callbacks
-export([init/1,
eredis_start_link/2
]).
-define(SERVER, ?MODULE... | Set default connection timeout to 2 seconds | Set default connection timeout to 2 seconds
| Erlang | apache-2.0 | stephenbm/chef-server,chef/chef-server,stephenbm/chef-server,chef/chef-mover,stephenbm/chef-server,Minerapp/chef-server,marcparadise/chef-server,vladuemilian/chef-server,juliandunn/chef-server-1,Minerapp/chef-server,charlesjohnson/chef-server,juliandunn/chef-server-1,charlesjohnson/chef-server,marcparadise/chef-server,... |
57ba4189aa4c751f2c7c140a9130e9ed7dadadc8 | exercise1/apps/exercise1/src/dlq_test.erl | exercise1/apps/exercise1/src/dlq_test.erl | %%%-------------------------------------------------------------------
%%% @author fawin
%%% @copyright (C) 2017, <COMPANY>
%%% @doc
%%%
%%% @end
%%% Created : 29. Mar 2017 14:18
%%%-------------------------------------------------------------------
-module(dlq_test).
-include_lib("eunit/include/eunit.hrl").
%% API
-e... | -module(dlq_test).
-include_lib("eunit/include/eunit.hrl").
% Should create an empty DLQ
initDLQ_test() -> {[], 3, "Test"} = dlq:initDLQ(3, "Test"). | Add more docu to test | Add more docu to test
| Erlang | mit | meandor/vs2017,meandor/vs2017 |
e9b6883828271f90364602bb23e5ac78e741beb4 | src/lib/wf_pandoc.erl | src/lib/wf_pandoc.erl | -module(wf_pandoc).
-include("wf.hrl").
-export([
convert_file/2,
convert/2
]).
convert(Contents, Options) ->
ScratchDir = simple_bridge_util:get_scratch_dir("./scratch"),
RandFile = filename:join(ScratchDir, "tempfile_" ++ wf:to_list(?WF_RAND_UNIFORM(1000000000000, 99999999999999999))),
file:writ... | -module(wf_pandoc).
-include("wf.hrl").
-export([
convert_file/2,
convert/2
]).
convert(Contents, Options) ->
ScratchDir = simple_bridge_util:get_scratch_dir("./scratch"),
RandFile = filename:join(ScratchDir, "tempfile_" ++ wf:to_list(?WF_RAND_UNIFORM(1000000000000, 99999999999999999))),
file:writ... | Fix pandoc lists:join -> wf:join | Fix pandoc lists:join -> wf:join
| Erlang | mit | choptastic/nitrogen_core,nitrogen/nitrogen_core,nitrogen/nitrogen_core,choptastic/nitrogen_core,choptastic/nitrogen_core,nitrogen/nitrogen_core,nitrogen/nitrogen_core |
b96b528b46e056d877645f778a29921b6baa17da | infer/tests/codetoanalyze/erlang/pulse-otp/otp_gen_server.erl | infer/tests/codetoanalyze/erlang/pulse-otp/otp_gen_server.erl | % Copyright (c) Facebook, Inc. and its affiliates.
%
% This source code is licensed under the MIT license found in the
% LICENSE file in the root directory of this source tree.
-module(otp_gen_server).
-export([
fp_test_cast_Ok/0,
test_cast_Bad/0
]).
% T119301532 -- should become non-FP with an OTP update
fp... | % Copyright (c) Facebook, Inc. and its affiliates.
%
% This source code is licensed under the MIT license found in the
% LICENSE file in the root directory of this source tree.
-module(otp_gen_server).
-export([
fp_test_cast_Ok/0,
test_cast_Bad/0
]).
% FP: T115354480
fp_test_cast_Ok() ->
ok = gen_server:... | Fix comment about reason of FP | [erl-frontend] Fix comment about reason of FP
Summary: This FP is still a FP but for a different reason: previously it was a missing OTP spec, but now it's related to Pulse limitations.
Reviewed By: jvillard
Differential Revision: D38312267
fbshipit-source-id: 98c6a95d40c8ca6f9a6c24c0a759d6570ef86be9
| Erlang | mit | facebook/infer,facebook/infer,facebook/infer,facebook/infer,facebook/infer,facebook/infer,facebook/infer |
1c419ef2a9aa3c32f42ffb19e9d7c6e4333aefc0 | src/inets_bridge_modules/inets_simple_bridge_anchor.erl | src/inets_bridge_modules/inets_simple_bridge_anchor.erl | -module(inets_simple_bridge_anchor).
-export ([do/1]).
do(Req) ->
try
Bridge = simple_bridge:make(inets, Req),
ReqPath = Bridge:path(),
case simple_bridge_util:is_static_path(inets, ReqPath) of
true ->
Bridge2 = Bridge:set_response_file(ReqPath),
Bridge2:build_response();
false ->
Callout = s... | -module(inets_simple_bridge_anchor).
-export ([do/1]).
do(Req) ->
Bridge = simple_bridge:make(inets, Req),
ReqPath = Bridge:path(),
case simple_bridge_util:is_static_path(inets, ReqPath) of
true ->
Bridge2 = Bridge:set_response_file(ReqPath),
Bridge2:build_response();
false ->
Callout = simple_bridge_... | Remove try-catch block from inets anchor | Remove try-catch block from inets anchor
| Erlang | mit | danikp/simple_bridge,stuart-thackray/simple_bridge,choptastic/simple_bridge,nitrogen/simple_bridge,SovereignPrime/simple_bridge,wwezhuimeng/simple_bridge |
7238f68c4adf56b0596dabe271c3fca24c8aa5a4 | apps/aecore/src/aec_tx_dispatcher.erl | apps/aecore/src/aec_tx_dispatcher.erl | -module(aec_tx_dispatcher).
-export([handler/1,
handler_by_type/1]).
-include("core_txs.hrl").
-include_lib("apps/aeoracle/include/oracle_txs.hrl").
handler(#coinbase_tx{}) ->
aec_coinbase_tx;
handler(#spend_tx{}) ->
aec_spend_tx;
handler(#oracle_register_tx{}) ->
aeo_register_tx;
handler(#oracle... | -module(aec_tx_dispatcher).
-export([handler/1,
handler_by_type/1]).
-include("core_txs.hrl").
-include_lib("apps/aeoracle/include/oracle_txs.hrl").
-include_lib("apps/aecontract/include/contract_txs.hrl").
handler(#coinbase_tx{}) ->
aec_coinbase_tx;
handler(#spend_tx{}) ->
aec_spend_tx;
handler(#con... | Set up dispatching of contract transactions | Set up dispatching of contract transactions
| Erlang | isc | aeternity/epoch,aeternity/epoch,aeternity/epoch,aeternity/epoch |
c949174d3f99112d2cbedf3df3969a41cfdb6c1f | src/ewg_status.erl | src/ewg_status.erl | -module(ewg_status).
-export([show/0, show/1]).
%% Here we'll get application status things (widget if you like) where
%% applications can put their "things" that will be rendered on all pages.
%% e.g. quick status indications like alarms
show() ->
show("default").
show(_Group) ->
[].
| -module(ewg_status).
-export([show/0, show/1]).
%% Here we'll get application status things (widget if you like) where
%% applications can put their "things" that will be rendered on all pages.
%% e.g. quick status indications like alarms
show() ->
show("default").
show(_Group) ->
case ewg_conf:read(status_bo... | Add callback drived status "widget" | Add callback drived status "widget"
| Erlang | mit | fholzhauser/ewebgui |
2d7801d9202cabc8110a97d3650a27d0ac5c75fe | bowling/erlang/game_happy.erl | bowling/erlang/game_happy.erl | %% Calculate score for bowling game
%% Assumes valid and complete input
-module(game_happy).
-export([score/1]).
score(Rolls) -> frame(1, 0, Rolls).
% Game complete.
frame(11, Score, _BonusRolls) -> Score;
%% Strike.
frame(Frame, Score, [10|Rest]) ->
frame(Frame + 1, Score + 10 + strike_bonus(Rest), Rest);
%% S... | %% Calculate score for bowling game
%% Assumes valid and complete input
-module(game_happy).
-export([score/1]).
score(Rolls) -> score(1, 0, Rolls).
% Game complete.
score(11, Score, _BonusRolls) -> Score;
%% Strike.
score(Frame, Score, [10|Rest]) ->
score(Frame + 1, Score + 10 + strike_bonus(Rest), Rest);
%% S... | Rename 'frame' function to 'score' | Rename 'frame' function to 'score'
| Erlang | mit | bluegraybox/examples,bluegraybox/examples,bluegraybox/examples,bluegraybox/examples,bluegraybox/examples,bluegraybox/examples |
cecfe08a0dc06e4b8ec60bd09d3a80170eeb619e | src/mover_phase_2_migration_callback.erl | src/mover_phase_2_migration_callback.erl | -module(mover_phase_2_migration_callback).
-export([
migration_start_worker_args/2,
migration_action/2,
migration_type/0,
supervisor/0,
error_halts_migration/0,
reconfigure_object/2
]).
-include("mover.hrl").
-include_lib("moser/include/moser.hrl").
migr... | -module(mover_phase_2_migration_callback).
-export([
migration_start_worker_args/2,
migration_action/2,
migration_type/0,
supervisor/0,
error_halts_migration/0,
reconfigure_object/2
]).
-include("mover.hrl").
-include_lib("moser/include/moser.hrl").
migr... | Return the correct value on success in migration_action. | Return the correct value on success in migration_action.
| Erlang | apache-2.0 | rmoorman/chef-server,poliva83/chef-server,Minerapp/chef-server,vladuemilian/chef-server,poliva83/chef-server,charlesjohnson/chef-server,stephenbm/chef-server,charlesjohnson/chef-server,charlesjohnson/chef-server,Minerapp/chef-server,itmustbejj/chef-server,poliva83/chef-server,vladuemilian/chef-server,itmustbejj/chef-se... |
a108a76355d453fed8d10ff983af9e26f8b9ebde | main.erl | main.erl | -module(main).
-export([start/0]).
start() ->
io:format("Hello world~n").
| -module(main).
-export([start/1]).
start([Name]) ->
io:format("Hello ~s!~n", [Name]).
| Add argument to hello world. | Add argument to hello world.
| Erlang | epl-1.0 | hyPiRion/genetica,hyPiRion/genetica |
71017166b8345d2a7643000519879c23dbde43a6 | src/gcprof.erl | src/gcprof.erl | -module(gcprof).
-export([start/0, stop/0]).
-export([trace/2, trace_me/1, sample_me/2]).
start() -> application:start(gcprof).
stop() -> application:stop(gcprof).
%% @doc: Starts tracing garbage collections in the given
%% process. Note: gen_server:cast is used, so at some point in the
%% future, tracing *might* st... | -module(gcprof).
-export([start/0, stop/0]).
-export([trace/2, trace_me/1, sample_me/2]).
start() -> application:start(gcprof).
stop() -> application:stop(gcprof).
%% @doc: Starts tracing garbage collections in the given
%% process. Note: gen_server:cast is used, so at some point in the
%% future, tracing *might* st... | Allow sampling if argument is 'true'. | Allow sampling if argument is 'true'.
| Erlang | mit | knutin/gcprof |
08eed07d144e4a74108f77fb8763c007846b9533 | src/handlers/n2o_secret.erl | src/handlers/n2o_secret.erl | -module(n2o_secret).
-author('Oleksandr Nikitin').
-include_lib("n2o/include/wf.hrl").
-export(?PICKLES_API).
pickle(Data) ->
Message = term_to_binary({Data,now()}),
Padding = size(Message) rem 16,
Bits = (16-Padding)*8, Key = secret(), IV = crypto:rand_bytes(16),
Cipher = crypto:block_encrypt(aes_cbc1... | -module(n2o_secret).
-author('Oleksandr Nikitin').
-include_lib("n2o/include/wf.hrl").
-export(?PICKLES_API).
pickle(Data) ->
Message = term_to_binary({Data,now()}),
Padding = size(Message) rem 16,
Bits = (16-Padding)*8, Key = secret(), IV = crypto:rand_bytes(16),
Cipher = crypto:block_encrypt(aes_cbc1... | Change signature calculation to data/IV/secret | Change signature calculation to data/IV/secret | Erlang | mit | leikind/n2o,fxmy/n2o,beni55/n2o,alttagil/n2o,dreyk/n2o,beni55/n2o,pap/n2o,pap/n2o,alttagil/n2o,fxmy/n2o,pap/n2o,beni55/n2o,kongx73/n2o,cystbear/n2o,aseidlitz/n2o,cystbear/n2o,leikind/n2o,aseidlitz/n2o,aseidlitz/n2o,fxmy/n2o,alttagil/n2o,kongx73/n2o |
0863dc82b4eb642cf476c1b57da7b2fd0b0360fd | modules/mod_ginger_rdf/support/rdf_property.erl | modules/mod_ginger_rdf/support/rdf_property.erl | %% @doc Convenience wrapper for constructing linked data predicates.
-module(rdf_property).
-export([
'dbpedia-owl'/1,
foaf/1,
rdfs/1
]).
-include_lib("zotonic.hrl").
-include_lib("../include/rdf.hrl").
'dbpedia-owl'(Property) ->
property(?NS_DBPEDIA_OWL, Property).
foaf(Property) ->
property(?N... | %% @doc Convenience wrapper for constructing linked data predicates.
-module(rdf_property).
-export([
'dbpedia-owl'/1,
foaf/1,
geo/1,
rdf/1,
rdfs/1,
schema/1,
vcard/1
]).
-include_lib("zotonic.hrl").
-include_lib("../include/rdf.hrl").
-spec 'dbpedia-owl'(binary()) -> binary().
'dbpedia-o... | Add functions for constructing RDF properties | [rdf] Add functions for constructing RDF properties
* Prefer function calls over macros.
| Erlang | apache-2.0 | driebit/ginger,driebit/ginger,driebit/ginger |
91b9f978c31aec17a3f3df642bd173e8a37e6398 | src/token_resource.erl | src/token_resource.erl | -module(token_resource).
-export([
init/1,
allowed_methods/2,
process_post/2
]).
-include_lib("webmachine/include/webmachine.hrl").
init([]) ->
{ok, []}.
allowed_methods(Request, Context) ->
{['POST'], Request, Context}.
process_post(Request, Context) ->
Params = mochiweb_util:parse_qs(wrq:r... | -module(token_resource).
-export([
init/1,
allowed_methods/2,
process_post/2
]).
-include_lib("webmachine/include/webmachine.hrl").
init([]) ->
{ok, []}.
allowed_methods(Request, Context) ->
{['POST'], Request, Context}.
process_post(Request, Context) ->
io:format("Request: ~p", [Request]),
... | Remove extra semi-colon in case | Remove extra semi-colon in case
| Erlang | apache-2.0 | connorsml/myproject |
48c7f53930e60eacec82b671d91aaac773ba9bab | inttest/ct2/ct2_rt.erl | inttest/ct2/ct2_rt.erl | -module(ct2_rt).
-compile(export_all).
files() ->
[{create, "ebin/foo.app", app(foo)},
{copy, "../../rebar", "rebar"},
{copy, "foo.test.spec", "test/foo.test.spec"},
{copy, "foo_SUITE.erl", "test/foo_SUITE.erl"}].
run(_Dir) ->
{ok, _} = retest:sh("./rebar compile ct -vvv"),
ok.
%%
%% Gen... | -module(ct2_rt).
-compile(export_all).
files() ->
[{create, "ebin/foo.app", app(foo)},
{copy, "../../rebar", "rebar"},
{copy, "foo.test.spec", "foo.test.spec"},
{copy, "foo_SUITE.erl", "test/foo_SUITE.erl"}].
run(_Dir) ->
{ok, _} = retest:sh("./rebar compile ct -vvv"),
ok.
%%
%% Generate... | Fix inttest/ct2 ct spec file location (Thanks Peter Andersson) | Fix inttest/ct2 ct spec file location (Thanks Peter Andersson)
The DirRef in the spec file is relative to the directory where the spec
file is located. ct2_rt was erroneously copying the spec file to test/.
| Erlang | apache-2.0 | beni55/rebar,beni55/rebar,SiDen/rebar,jbalint/rebar3,jacktang/rebar,fauxsoup/rebar3,processone/rebar3,benoitc/rebar3,SiDen/rebar,scatterbrain/rebar,paulo-ferraz-oliveira/rebar,jacktang/rebar,evnix/rebar,scatterbrain/rebar,dcarastan/rebar,thomasbhatia/rebar,matwey/rebar,fishcakez/rebar3,norton/rebar,csyangchen/rebar,lpg... |
000f956d5aa17349e5c86d35fcd55df6f1095a77 | src/index_handler.erl | src/index_handler.erl | -module(index_handler).
-behavior(cowboy_http_handler).
-export([init/3, handle/2, terminate/3]).
init(_Type, Req, _Opts) ->
{ok, Req, undefined_state}.
handle(Req, State) ->
{ok, Req2} = cowboy_req:reply(200, [
{<<"content-type">>, <<"text/plain">>}
], <<"Ok.">>, Req),
{ok, Req2, State}.
... | -module(index_handler).
-behavior(cowboy_websocket_handler).
-export([init/3, websocket_init/3, websocket_handle/3, websocket_info/3, websocket_terminate/3]).
init({tcp, http}, Req, Opts) ->
{upgrade, protocol, cowboy_websocket}.
websocket_init(_TransportName, Req, _Opts) ->
{ok, Req, undefined_state}.
w... | Change index handler to no-op websocket handler. | Change index handler to no-op websocket handler.
| Erlang | bsd-2-clause | mlavin/shoestring |
fe8a9f6e208e5a3bc0514ca90163d92c8ef367d9 | src/builtins/Module.erl | src/builtins/Module.erl | %
% Module: Methods of the Module builtin
% Copyright (C)2009 Tony Arcieri
%
% Redistribution is permitted under the MIT license. See LICENSE for details.
%
-module('Module').
-export([call/4]).
-include("../core/reia_invoke.hrl").
-include("../core/reia_types.hrl").
call(Module, inspect, _Args, _Block) ->
Name =... | %
% Module: Methods of the Module builtin
% Copyright (C)2009 Tony Arcieri
%
% Redistribution is permitted under the MIT license. See LICENSE for details.
%
-module('Module').
-export([call/4]).
-include("../core/reia_invoke.hrl").
-include("../core/reia_types.hrl").
call(Module, inspect, _Args, _Block) ->
Name =... | Support for dispatching to user-defined modules | Support for dispatching to user-defined modules
| Erlang | mit | beni55/reia,tarcieri/reia,beni55/reia,tarcieri/reia |
a52077dac1c6c666fe7c21403cbc8b810014b3cd | src/erlcfg_schema_analyser1.erl | src/erlcfg_schema_analyser1.erl | -module(erlcfg_schema_analyser1).
-include("schema.hrl").
-export([analyse/1]).
analyse([]) ->
?DEFAULT_TYPE_MAP;
analyse([Head|Rest]) ->
Types = ?DEFAULT_TYPE_MAP,
analyse(Head, Rest, Types).
analyse(Current, [Head|Rest], Types0) ->
Types1 = eval(Current, Types0),
analyse(Head, Rest, Types1);
an... | -module(erlcfg_schema_analyser1).
-include("schema.hrl").
-export([analyse/1]).
analyse([]) ->
?DEFAULT_TYPE_MAP;
analyse([Head|Rest]) ->
Types = ?DEFAULT_TYPE_MAP,
analyse(Head, Rest, Types).
analyse(Current, [Head|Rest], Types0) ->
Types1 = eval(Current, Types0),
analyse(Head, Rest, Types1);
an... | Build a proper validator for type defs | Build a proper validator for type defs
and add that to the validator mapping structure
Signed-off-by: Essien Ita Essien <bd402154b008803b915ff3326ddb7528f7e13a6b@gmail.com>
| Erlang | bsd-3-clause | saleyn/erlcfg |
36df55699d25b6230b82964af4265dc9e63e284d | src/elli_test.erl | src/elli_test.erl | %%% @author Andreas Hasselberg <andreas.hasselberg@gmail.com>
%%% @doc
%%%
%%% @end
-module(elli_test).
-include("../include/elli.hrl").
-export([call/5]).
call(Method, RawPath, RequestHeaders, RequestBody, Opts) ->
Callback = proplists:get_value(callback, Opts),
CallbackArgs = proplists:get_value(callback_... | %%% @author Andreas Hasselberg <andreas.hasselberg@gmail.com>
%%% @doc
%%%
%%% @end
-module(elli_test).
-include("../include/elli.hrl").
-export([call/5]).
call(Method, RawPath, RequestHeaders, RequestBody, Opts) ->
Callback = proplists:get_value(callback, Opts),
CallbackArgs = proplists:get_value(callback_... | Make sure the callback gets initialized before the test. | Make sure the callback gets initialized before the test.
| Erlang | mit | elli-lib/elli,tsloughter/elli,K2InformaticsGmbH/elli,elli-lib/elli,knutin/elli,K2InformaticsGmbH/elli,odo/elli,tsloughter/elli,knutin/elli,odo/elli |
b6d917e75270cd3220300fc00583e4d3cfa8b460 | priv/docsh_rebar3_shell.escript | priv/docsh_rebar3_shell.escript | %% This script enables docsh shell extensions in Rebar3 shell.
%% Make sure to have the following in rebar.config of your project:
%%
%% {plugins,
%% [
%% {rebar3_docsh, "0.7.1", {pkg, docsh}}
%% ]}.
%% {shell, [{script_file, "_build/default/plugins/rebar3_docsh/priv/docsh_rebar3_shell.escript"}]}.
%%
%% The r... | %% This script enables docsh shell extensions in Rebar3 shell.
%% Make sure to have the following in rebar.config of your project:
%%
%% {plugins,
%% [
%% {rebar3_docsh, "0.7.2", {pkg, docsh}}
%% ]}.
%% {shell, [{script_file, "_build/default/plugins/rebar3_docsh/priv/docsh_rebar3_shell.escript"}]}.
%%
%% The r... | Update the Rebar3 helper to use 0.7.2 | [skip ci] Update the Rebar3 helper to use 0.7.2
| Erlang | bsd-3-clause | lavrin/docsh |
be8182b83db4aead17e4dfd9e62b74cb3fbbd19b | src/teles_data_manager_sup.erl | src/teles_data_manager_sup.erl | -module(teles_data_manager_sup).
-behaviour(supervisor).
-export([start_link/1, init/1, start_agents/2, start_agent/2]).
start_link(NumAgents) ->
supervisor:start_link({local, ?MODULE}, ?MODULE, [NumAgents]).
init([NumAgents]) ->
Manager = {data_manager, {teles_data_manager, start_link, [NumAgents]},
... | -module(teles_data_manager_sup).
-behaviour(supervisor).
-export([start_link/1, init/1, start_agents/2, start_agent/2]).
start_link(NumAgents) ->
supervisor:start_link({local, ?MODULE}, ?MODULE, [NumAgents]).
init([NumAgents]) ->
Manager = {data_manager, {teles_data_manager, start_link, [NumAgents]},
... | Return results in correct order | Return results in correct order
| Erlang | bsd-3-clause | armon/teles,armon/teles |
e21fc5279c44ae34275e924caca20d553f55526b | include/erldns.hrl | include/erldns.hrl | -include_lib("dns/include/dns_records.hrl").
-record(keyset, {
key_signing_key :: crypto:rsa_private(),
key_signing_key_tag :: non_neg_integer(),
key_signing_alg :: non_neg_integer(),
zone_signing_key :: crypto:rsa_private(),
zone_signing_key_tag :: non_neg_integer(),
zone_signing_alg :: non_ne... | -include_lib("dns/include/dns_records.hrl").
-record(keyset, {
key_signing_key :: crypto:rsa_private(),
key_signing_key_tag :: non_neg_integer(),
key_signing_alg :: non_neg_integer(),
zone_signing_key :: crypto:rsa_private(),
zone_signing_key_tag :: non_neg_integer(),
zone_signing_alg :: non_ne... | Update type for inception and valid_until | Update type for inception and valid_until | Erlang | mit | aetrion/erl-dns |
a4e243576fdd9c89cedaabd76cc6ab5b1c9a9efc | src/handlers/n2o_syn.erl | src/handlers/n2o_syn.erl | -module(n2o_syn).
-include_lib("n2o/include/wf.hrl").
-export(?MESSAGE_API).
send(Pool, Message) -> syn:publish(term_to_binary(Pool),Message).
reg(Pool) -> reg(Pool,undefined).
reg(Pool, Value) ->
case get({pool,Pool}) of
undefined -> syn:register(term_to_binary(Pool),self(),Value),
... | -module(n2o_syn).
-include_lib("n2o/include/wf.hrl").
-export(?MESSAGE_API).
send(Pool, Message) -> syn:publish(term_to_binary(Pool),Message).
reg(Pool) -> reg(Pool,undefined).
reg(Pool, Value) ->
case get({pool,Pool}) of
undefined -> syn:join(term_to_binary(Pool),self()),
put({pool,... | Fix pool reg and unreg | Fix pool reg and unreg | Erlang | mit | fxmy/n2o,fxmy/n2o,fxmy/n2o |
b12c526a5cdb3aeaca1ba5a715ba7c4b41683352 | include/pgsql_listen.hrl | include/pgsql_listen.hrl |
-define(X_TYPE, <<"x-pgsql-listen">>).
-define(X_DESC, <<"PostgreSQL LISTEN Exchange.">>).
-define(VALIDATE_ERROR,
"Cannot bind a PgSQL Listen exchange to another PgSQL Listen exchange").
-define(DEFAULT_HOST, <<"localhost">>).
-define(DEFAULT_PORT, 5432).
-define(DEFAULT_USER, <<"postgres">>).
-define(DEFAU... | %%==============================================================================
%% @author Gavin M. Roy <gavinr@aweber.com>
%% @copyright 2014 AWeber Communications
%% @end
%%==============================================================================
%% @doc Constantsand records for the pgsql-listen exchange
%% @e... | Add records, update constant name for password | Add records, update constant name for password
| Erlang | bsd-3-clause | 3manuek/pgsql-listen-exchange |
247c6649658853e70caa7dfb3e82b9a925cd5108 | src/simple_bridge_handler.erl | src/simple_bridge_handler.erl | % vim: ts=4 sw=4 et
-module(simple_bridge_handler).
-include("simple_bridge.hrl").
-type data() :: iolist().
-type ws_data() :: {text, binary()} | {binary, binary()}.
-type reply() :: ws_data() | [ws_data()].
-type reason() :: integer().
-type state() ... | % vim: ts=4 sw=4 et
-module(simple_bridge_handler).
-include("simple_bridge.hrl").
-type data() :: iolist() | binary().
-type ws_data() :: {text, data()} | {binary, data()}.
-type reply() :: ws_data() | [ws_data()].
-type reason() :: integer().
-type state() ... | Update callback definition for dialyzer | Update callback definition for dialyzer
| Erlang | mit | danikp/simple_bridge,choptastic/simple_bridge,wwezhuimeng/simple_bridge,nitrogen/simple_bridge,SovereignPrime/simple_bridge,stuart-thackray/simple_bridge |
8cfc72b7d01222dfcbb6e9932df76a04e2704fdc | src/boss/boss_mail_driver_smtp.erl | src/boss/boss_mail_driver_smtp.erl | -module(boss_mail_driver_smtp).
-export([start/0, stop/1, deliver/4]).
start() ->
OptionsBase = [{tls, if_available},
{ssl, false}, {hostname, smtp_util:guess_FQDN()}, {retries, 1}],
Options = case application:get_env(mail_relay_host) of
{ok, Relay} ->
[{relay, Relay} | OptionsBase]... | -module(boss_mail_driver_smtp).
-export([start/0, stop/1, deliver/4]).
start() ->
OptionsBase = [{ssl, false}, {hostname, smtp_util:guess_FQDN()}, {retries, 1}],
{ok, OptionsBase ++ get_tls() ++ get_host() ++ get_port() ++ get_credentials()}.
get_tls() ->
case application:get_env(mail_relay_use_tls) of
... | Add port and tls settings to smtp config. | Add port and tls settings to smtp config.
| Erlang | mit | solatis/ChicagoBoss,ChicagoBoss/ChicagoBoss,aherranz/ChicagoBoss,lamptt/ChicagoBoss,7i11/ChicagoBoss,synlay/ChicagoBoss,uselessd/ChicagoBoss,7i11/ChicagoBoss,powermedia/ChicagoBoss,solatis/ChicagoBoss,aherranz/ChicagoBoss,lamptt/ChicagoBoss,synlay/ChicagoBoss,yunkai/ChicagoBoss,yunkai/ChicagoBoss,powermedia/ChicagoBoss... |
10c2c5d714928ccfe25db0a61f41e7b996a4ead8 | src/mem3_sup.erl | src/mem3_sup.erl | % Copyright 2010 Cloudant
%
% Licensed under the Apache License, Version 2.0 (the "License"); you may not
% use this file except in compliance with the License. You may obtain a copy of
% the License at
%
% http://www.apache.org/licenses/LICENSE-2.0
%
% Unless required by applicable law or agreed to in writing, softw... | % Copyright 2010 Cloudant
%
% Licensed under the Apache License, Version 2.0 (the "License"); you may not
% use this file except in compliance with the License. You may obtain a copy of
% the License at
%
% http://www.apache.org/licenses/LICENSE-2.0
%
% Unless required by applicable law or agreed to in writing, softw... | Reorder supervision tree to start mem3_nodes earlier | Reorder supervision tree to start mem3_nodes earlier
mem3_sync requires mem3_nodes to be running during init.
| Erlang | apache-2.0 | fkaempfer/couchdb,fkaempfer/couchdb,fkaempfer/couchdb,fkaempfer/couchdb,fkaempfer/couchdb,fkaempfer/couchdb |
69f615227a45e921878dc4f5260154b10fcda42f | gateway/apps/cvmfs_services/src/cvmfs_fe.erl | gateway/apps/cvmfs_services/src/cvmfs_fe.erl | %%%-------------------------------------------------------------------
%%% This file is part of the CernVM File System.
%%%
%%% @doc cvmfs_fe - CVMFS repo services HTTP front-end
%%%
%%% @end
%%%-------------------------------------------------------------------
-module(cvmfs_fe).
-export([start_link/1, api_version/0... | %%%-------------------------------------------------------------------
%%% This file is part of the CernVM File System.
%%%
%%% @doc cvmfs_fe - CVMFS repo services HTTP front-end
%%%
%%% @end
%%%-------------------------------------------------------------------
-module(cvmfs_fe).
-export([start_link/1, api_version/0... | Use much larger request timeouts for the Cowboy server | Use much larger request timeouts for the Cowboy server
| Erlang | bsd-3-clause | cvmfs/cvmfs,DrDaveD/cvmfs,cvmfs/cvmfs,DrDaveD/cvmfs,DrDaveD/cvmfs,cvmfs/cvmfs,DrDaveD/cvmfs,DrDaveD/cvmfs,cvmfs/cvmfs,cvmfs/cvmfs,DrDaveD/cvmfs,DrDaveD/cvmfs,cvmfs/cvmfs,cvmfs/cvmfs |
f39b9347162a43fe14b0f6372849bc1f7aba45c1 | exercises/practice/hello-world/src/hello_world.erl | exercises/practice/hello-world/src/hello_world.erl | -module(hello_world).
-export([hello/0]).
hello() -> undefined.
| -module(hello_world).
-export([hello/0]).
hello() ->
"Goodbye, Mars!".
| Simplify the `hello-world` exercise's stub. The goal of this is to make things easier for students to get started and to introduce as little syntax as possible. | Simplify the `hello-world` exercise's stub. The goal of this is to make things easier for students to get started and to introduce as little syntax as possible.
| Erlang | mit | NobbZ/xerlang |
82ff3181104977ac2cdd8a3cf1e3faf51bae7e5a | src/jrl_lex.erl | src/jrl_lex.erl | % lex.erl
% Lexer implementation for Jrlscript Compiler
-module(jrl_lex).
-compile(export_all).
lex() ->
io:format("Usage - lex(Input<String>).~n", []).
lex(Input) ->
SplitInput = re:split(Input, "", [{return, binary}]),
scan(SplitInput).
% Scanner Functions:
% Scans a list in the form [<<char>...] and gener... | % lex.erl
% Lexer implementation for Jrlscript Compiler
-module(jrl_lex).
-compile(export_all).
lex() ->
io:format("Usage - lex(Input<String>).~n", []).
lex(Input) ->
SplitInput = re:split(Input, "", [{return, binary}]),
scan(SplitInput).
% Scanner Functions:
% Scans a list in the form [<<char>...] and gener... | Test because my commits seemingly aren't being tracked | Test because my commits seemingly aren't being tracked
| Erlang | mit | Vereis/jarlang,Vereis/jarlang |
8497a50fcef78e50a24518a10f5fb8b05015482d | src/rebar_prv_state.erl | src/rebar_prv_state.erl | %% -*- erlang-indent-level: 4;indent-tabs-mode: nil -*-
%% ex: ts=4 sw=4 et
-module(rebar_prv_state).
-behaviour(provider).
-export([init/1,
do/1,
format_error/1]).
-include("rebar.hrl").
-define(PROVIDER, state).
-define(DEPS, []).
%% ============================================================... | %% -*- erlang-indent-level: 4;indent-tabs-mode: nil -*-
%% ex: ts=4 sw=4 et
-module(rebar_prv_state).
-behaviour(provider).
-export([init/1,
do/1,
format_error/1]).
-include("rebar.hrl").
-define(PROVIDER, state).
-define(DEPS, []).
%% ============================================================... | Change output to use ?CONSOLE macro | Change output to use ?CONSOLE macro
| Erlang | apache-2.0 | lrascao/rebar3,tsloughter/rebar3,rebar/rebar3,djnym/rebar3,benoitc/rebar3,erlang/rebar3,vladdu/rebar3,ferd/rebar3,benoitc/rebar3,norton/rebar3,rebar/rebar3,saleyn/rebar3 |
7bc5c904c3572e91a1dd5e89bd759dc8281c8545 | test/riak_moss_wm_bucket_test.erl | test/riak_moss_wm_bucket_test.erl | %% -------------------------------------------------------------------
%%
%% Copyright (c) 2007-2011 Basho Technologies, Inc. All Rights Reserved.
%%
%% -------------------------------------------------------------------
-module(riak_moss_wm_bucket_test).
-export([bucket_test_/0]).
-include("riak_moss.hrl").
-inclu... | %% -------------------------------------------------------------------
%%
%% Copyright (c) 2007-2011 Basho Technologies, Inc. All Rights Reserved.
%%
%% -------------------------------------------------------------------
-module(riak_moss_wm_bucket_test).
-export([bucket_test_/0]).
-include("riak_moss.hrl").
-inclu... | Add a doc and TODO | Add a doc and TODO
AZ870
| Erlang | apache-2.0 | GabrielNicolasAvellaneda/riak_cs,yangchengjian/riak_cs,basho/riak_cs,dragonfax/riak_cs,basho/riak_cs_report,dragonfax/riak_cs,yangchengjian/riak_cs,yangchengjian/riak_cs,basho/riak_cs,basho/riak_cs_lfs,laurenrother/riak_cs,dragonfax/riak_cs,yangchengjian/riak_cs,laurenrother/riak_cs,sdebnath/riak_cs,dragonfax/riak_cs,G... |
4393064ecd075cd3fcf7543e0096413e43875c0d | src/elements/forms/element_datepicker_textbox.erl | src/elements/forms/element_datepicker_textbox.erl | % vim: sw=4 ts=4 et ft=erlang
%%% Datepicker Control Element.
%%% Copyright (c) 2009 Torbjorn Tornkvist
%%% See MIT-LICENSE for the Nitrogen Web Framework for Erlang
-module (element_datepicker_textbox).
-include("wf.hrl").
-export([
reflect/0,
render_element/1
]).
-spec reflect() -> [atom()].
reflect() -> re... | % vim: sw=4 ts=4 et ft=erlang
%%% Datepicker Control Element.
%%% Copyright (c) 2009 Torbjorn Tornkvist
%%% See MIT-LICENSE for the Nitrogen Web Framework for Erlang
-module (element_datepicker_textbox).
-include("wf.hrl").
-export([
reflect/0,
render_element/1
]).
-spec reflect() -> [atom()].
reflect() -> re... | Fix typo in typespec for datepicker | Fix typo in typespec for datepicker
| Erlang | mit | nitrogen/nitrogen_core,nitrogen/nitrogen_core,SovereignPrime/nitrogen_core,SovereignPrime/nitrogen_core,stuart-thackray/nitrogen_core,choptastic/nitrogen_core,nitrogen/nitrogen_core,SovereignPrime/nitrogen_core,stuart-thackray/nitrogen_core,stuart-thackray/nitrogen_core,choptastic/nitrogen_core,choptastic/nitrogen_core... |
b3d850acf686c1090088f6cf8eb7bd468c5f2423 | src/docsh_edoc_xmerl_flat.erl | src/docsh_edoc_xmerl_flat.erl | -module(docsh_edoc_xmerl_flat).
-export(['#root#'/4,
'#element#'/5,
'#text#'/1,
'#xml-inheritance#'/0]).
-import(docsh_lib, [print/2]).
-include_lib("xmerl/include/xmerl.hrl").
-define(il2b(IOList), iolist_to_binary(IOList)).
-define(l2b(L), list_to_binary(L)).
-define(l2i(L), list_to_int... | -module(docsh_edoc_xmerl_flat).
-export(['#root#'/4,
'#element#'/5,
'#text#'/1,
'#xml-inheritance#'/0]).
-import(docsh_lib, [print/2]).
-include_lib("xmerl/include/xmerl.hrl").
-define(il2b(IOList), iolist_to_binary(IOList)).
-define(l2b(L), list_to_binary(L)).
-define(l2i(L), list_to_int... | Print element data in the edoc flat extraction mode | Print element data in the edoc flat extraction mode
| Erlang | bsd-3-clause | lavrin/docsh |
2613e044784b93e22bb159abaafca50ae5ce1b1f | include/webmachine_logger.hrl | include/webmachine_logger.hrl | -record(wm_log_data,
{resource_module :: atom(),
start_time :: tuple(),
method :: atom(),
headers,
peer,
sock,
path :: string(),
version,
response_code,
response_length,
end_time :: tuple(),
finish_time :: tuple()... | %% method will be an atom only for valid HTTP methods and a string otherwise,
%% see erlang:decode_packet documentation
-record(wm_log_data,
{resource_module :: atom(),
start_time :: tuple(),
method :: atom() | string() | binary(),
headers,
peer,
sock,
path... | Fix the type for method | Fix the type for method
A more precise type is documented the referenced documentation
| Erlang | apache-2.0 | sdebnath/webmachine,Webmachine/webmachine,Webmachine/webmachine,sdebnath/webmachine |
e0afbf93459828a8dc5f65c8367c9bcfdbce0f75 | Quickstart/src/quickstart_app.erl | Quickstart/src/quickstart_app.erl | -module (quickstart_app).
-export ([start/2, stop/0, do/1]).
-include_lib ("nitrogen/include/wf.hrl").
-define(PORT, 8000).
start(_, _) ->
inets:start(),
{ok, Pid} = inets:start(httpd, [
{port, ?PORT},
{server_name, "nitrogen"},
{server_root, "."},
{document_root, "./static"},
... | -module (quickstart_app).
-export ([start/2, stop/0, do/1]).
-include_lib ("nitrogen/include/wf.hrl").
-define(PORT, 8000).
start(_, _) ->
inets:start(),
{ok, Pid} = inets:start(httpd, [
{port, ?PORT},
{server_name, "nitrogen"},
{server_root, "."},
{document_root, "./static"},
... | Comment out basic auth by default. | Comment out basic auth by default.
| Erlang | mit | stuart-thackray/nitrogen,stuart-thackray/nitrogen,nitrogen/nitrogen,joaohf/nitrogen,joaohf/nitrogen,joaohf/nitrogen,choptastic/nitrogen,nitrogen/nitrogen,choptastic/nitrogen,nitrogen/nitrogen,kevinmontuori/nitrogen,choptastic/nitrogen,kevinmontuori/nitrogen,kevinmontuori/nitrogen,stuart-thackray/nitrogen |
4ae9fca3da798508ec5388bdedbb0198a580d0ee | apps/lucene_parser/src/lucene_parser.erl | apps/lucene_parser/src/lucene_parser.erl | %% -------------------------------------------------------------------
%%
%% Copyright (c) 2007-2010 Basho Technologies, Inc. All Rights Reserved.
%%
%% -------------------------------------------------------------------
-module(lucene_parser).
-export([parse/3]).
-include("lucene_parser.hrl").
%% @doc Parse a given... | %% -------------------------------------------------------------------
%%
%% Copyright (c) 2007-2010 Basho Technologies, Inc. All Rights Reserved.
%%
%% -------------------------------------------------------------------
-module(lucene_parser).
-export([parse/3]).
-include("lucene_parser.hrl").
%% @doc Parse a given... | Add error handling clause to catch error triplets returned from lucene_scan. | Add error handling clause to catch error triplets returned from lucene_scan.
Fixes: az775
The lucene_parser module only expects errors of the form {error, Reason}
from calling lucene_scan:string, but it can return errors of the form
{error, Reason, Line} and the lack of handling of errors of this form
is causing test... | Erlang | apache-2.0 | xuejianhai/riak_search,basho/riak_search,xuejianhai/riak_search,wwezhuimeng/riak_search,basho/riak_search,wwezhuimeng/riak_search |
5ca49fefa9006f4e9c853adf69da93f6f6bdf7bd | examples/echo_get/src/toppage_handler.erl | examples/echo_get/src/toppage_handler.erl | %% Feel free to use, reuse and abuse the code in this file.
%% @doc GET echo handler.
-module(toppage_handler).
-export([init/2]).
init(Req, Opts) ->
Method = cowboy_req:method(Req),
#{echo := Echo} = cowboy_req:match_qs([echo], Req),
Req2 = echo(Method, Echo, Req),
{ok, Req2, Opts}.
echo(<<"GET">>, undefined, ... | %% Feel free to use, reuse and abuse the code in this file.
%% @doc GET echo handler.
-module(toppage_handler).
-export([init/2]).
init(Req, Opts) ->
Method = cowboy_req:method(Req),
#{echo := Echo} = cowboy_req:match_qs([echo], Req),
echo(Method, Echo, Req),
{ok, Req, Opts}.
echo(<<"GET">>, undefined, Req) ->
... | Fix small issue in echo_get example | Fix small issue in echo_get example
| Erlang | isc | rabbitmq/cowboy,hairyhum/cowboy,bsmr-erlang/cowboy,CrankWheel/cowboy,kivra/cowboy,K2InformaticsGmbH/cowboy,turtleDeng/cowboy,ninenines/cowboy |
41c200f9f50619e190299fefeaded4419510b237 | src/logplex.erl | src/logplex.erl | %% @copyright Geoff Cant
%% @author Geoff Cant <nem@erlang.geek.nz>
%% @version {@vsn}, {@date} {@time}
%% @doc Logplex Shell functions
%% @end
-module(logplex).
-include("logplex_channel.hrl").
-export([serialize_channel/1
,deserialize_channel/1
]).
serialize_channel(ChannelId) when is_integer(Chan... | %% @copyright Geoff Cant
%% @author Geoff Cant <nem@erlang.geek.nz>
%% @version {@vsn}, {@date} {@time}
%% @doc Logplex Shell functions
%% @end
-module(logplex).
-export([serialize_channel/1
,deserialize_channel/1
]).
serialize_channel(ChannelId) when is_integer(ChannelId) ->
{logplex_channel:loo... | Remove unnecessary channel header file. | Remove unnecessary channel header file. | Erlang | mit | voidlock/logplex,srid/logplex,mkrysiak/logplex |
636e61f662f0b31cbb22185fc22c547dae0bb7b1 | upgrades/v36_v37/live_upgrade.erl | upgrades/v36_v37/live_upgrade.erl | f(UpgradeNode).
UpgradeNode = fun () ->
io:format(whereis(user), "at=upgrade_start cur_vsn=36~n", []),
l(logplex_tcpsyslog_drain),
l(logplex_tcpsyslog2_drain),
l(logplex_drain),
l(logplex_api),
l(logplex_drain_buffer),
l(logplex_drain_stats),
l(logplex_sup),
l(logplex_syslog_utils),
l(logplex_tcpsys... | f(UpgradeNode).
UpgradeNode = fun () ->
io:format(whereis(user), "at=upgrade_start cur_vsn=36~n", []),
l(logplex_tcpsyslog_drain),
l(logplex_tcpsyslog2_drain),
l(logplex_drain),
l(logplex_api),
l(logplex_drain_buffer),
l(logplex_drain_stats),
l(logplex_sup),
l(logplex_syslog_utils),
l(logplex_tcpsys... | Set updated git branch on upgrade completion. | Set updated git branch on upgrade completion. | Erlang | mit | mkrysiak/logplex,voidlock/logplex,srid/logplex |
f47567086fed86fdf8c7f57c5986a2b9f4f85063 | src/riak_moss_web.erl | src/riak_moss_web.erl | %% -------------------------------------------------------------------
%%
%% Copyright (c) 2007-2011 Basho Technologies, Inc. All Rights Reserved.
%%
%% -------------------------------------------------------------------
%% @doc Convenience functions for setting up the riak_moss HTTP interface.
-module(riak_moss_web... | %% -------------------------------------------------------------------
%%
%% Copyright (c) 2007-2011 Basho Technologies, Inc. All Rights Reserved.
%%
%% -------------------------------------------------------------------
%% @doc Convenience functions for setting up the riak_moss HTTP interface.
-module(riak_moss_web... | Change admin URI prefix from /RiakCS -> /riak-cs | Change admin URI prefix from /RiakCS -> /riak-cs
| Erlang | apache-2.0 | sdebnath/riak_cs,laurenrother/riak_cs,sdebnath/riak_cs,yangchengjian/riak_cs,sdebnath/riak_cs,laurenrother/riak_cs,GabrielNicolasAvellaneda/riak_cs,yangchengjian/riak_cs,basho/riak_cs,sdebnath/riak_cs,basho/riak_cs_report,basho/riak_cs_lfs,basho/riak_cs,dragonfax/riak_cs,GabrielNicolasAvellaneda/riak_cs,laurenrother/ri... |
85fd0143b50cdc4277fead2791dab449beefc83b | include/oauth1_parameter_names.hrl | include/oauth1_parameter_names.hrl | -define(PARAM_CALLBACK , <<"oauth_callback">>).
-define(PARAM_CONSUMER_KEY , <<"oauth_consumer_key">>).
-define(PARAM_NONCE , <<"oauth_nonce">>).
-define(PARAM_REALM , <<"realm">>).
-define(PARAM_SIGNATURE , <<"oauth_signature">>).
-define(PARAM_SIGNATURE_METHOD , <<"oauth_signa... | -define(PARAM_CALLBACK , <<"oauth_callback">>).
-define(PARAM_CALLBACK_CONFIRMED , <<"oauth_callback_confirmed">>).
-define(PARAM_CONSUMER_KEY , <<"oauth_consumer_key">>).
-define(PARAM_NONCE , <<"oauth_nonce">>).
-define(PARAM_REALM , <<"realm">>).
-define(PARAM_SIGNATURE , <<"... | Define name macro for parameter: "oauth_callback_confirmed" | Define name macro for parameter: "oauth_callback_confirmed"
| Erlang | mit | ibnfirnas/oauth1_core |
f91acba669808a0e9a5ad2d5fc4a0ce7b6ff6c86 | src/epl_ets_sup.erl | src/epl_ets_sup.erl | %%%-------------------------------------------------------------------
%% @doc epl_ets top level supervisor.
%% @end
%%%-------------------------------------------------------------------
-module(epl_ets_sup).
-behaviour(supervisor).
%% API
-export([start_link/0]).
%% Supervisor callbacks
-export([init/1]).
-defin... | %%%-------------------------------------------------------------------
%% @doc epl_ets top level supervisor.
%% @end
%%%-------------------------------------------------------------------
-module(epl_ets_sup).
-behaviour(supervisor).
%% API
-export([start_link/0]).
%% Supervisor callbacks
-export([init/1]).
-defin... | Fix epl_ets main sup to return apropriate term. | Fix epl_ets main sup to return apropriate term.
| Erlang | apache-2.0 | mkacper/erlangpl,erlanglab/erlangpl,mkacper/erlangpl,Baransu/erlangpl,Hajto/erlangpl,Baransu/erlangpl,Baransu/erlangpl,Hajto/erlangpl,mkacper/erlangpl,Hajto/erlangpl,erlanglab/erlangpl,erlanglab/erlangpl |
24f5943ddc1bb40615c0577107b7ef9d35a9ceb1 | apps/celo_core/src/celo_core_utilities.erl | apps/celo_core/src/celo_core_utilities.erl | %%%
%%% Copyright (c) 2015 The Celo 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 Alexander Færøy <ahf@0x90.dk>
%%% @doc The Celo Cor... | %%%
%%% Copyright (c) 2015 The Celo 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 Alexander Færøy <ahf@0x90.dk>
%%% @doc The Celo Cor... | Add utilities for working with hex encoded data. | Add utilities for working with hex encoded data.
| Erlang | bsd-2-clause | hushfile/celo |
70c75447a9598841a5225329ae53bcb1bf642118 | bench/basho_bench_driver_moss.erl | bench/basho_bench_driver_moss.erl | %% -------------------------------------------------------------------
%%
%% Copyright (c) 2007-2011 Basho Technologies, Inc. All Rights Reserved.
%%
%% -------------------------------------------------------------------
-module(basho_bench_driver_moss).
-export([new/1,
run/4]).
-include("basho_bench.hrl")... | %% -------------------------------------------------------------------
%%
%% Copyright (c) 2007-2011 Basho Technologies, Inc. All Rights Reserved.
%%
%% -------------------------------------------------------------------
-module(basho_bench_driver_moss).
-export([new/1,
run/4]).
-include("basho_bench.hrl")... | Add connect and disconnect funcs from Riak http driver | Add connect and disconnect funcs from Riak http driver
AZ918
| Erlang | apache-2.0 | laurenrother/riak_cs,basho/riak_cs_report,laurenrother/riak_cs,yangchengjian/riak_cs,dragonfax/riak_cs,basho/riak_cs,dragonfax/riak_cs,dragonfax/riak_cs,sdebnath/riak_cs,basho/riak_cs_lfs,laurenrother/riak_cs,basho/riak_cs,laurenrother/riak_cs,basho/riak_cs,sdebnath/riak_cs,dragonfax/riak_cs,yangchengjian/riak_cs,Gabri... |
6ff602a5a0d39ac3aec5baf7765fcce0a30dc97f | src/beamjs_mod_sys.erl | src/beamjs_mod_sys.erl | -module(beamjs_mod_sys).
-export([exports/0]).
-include_lib("erlv8/include/erlv8.hrl").
exports() ->
[{"print", fun print/3}].
print(_Script, #erlv8_fun_invocation{} = _Invocation, Expr) ->
io:format("~p",[Expr]),
undefined.
| -module(beamjs_mod_sys).
-export([exports/0]).
-include_lib("erlv8/include/erlv8.hrl").
exports() ->
[{"print", fun print/3}].
print(Script, #erlv8_fun_invocation{} = _Invocation, Expr) ->
io:format("~s",[erlv8_script:to_detail_string(Script,Expr)]),
undefined.
| Make sys.print() use v8's detail string for the object it is printing | Make sys.print() use v8's detail string for the object it is printing
| Erlang | bsd-2-clause | beamjs/beamjs,beamjs/beamjs |
6b6aa754c66f02ada7fbdc5e922b41c474234322 | src/utils/mas.erl | src/utils/mas.erl | %% @doc This module starts the mas framework with given environment, model and parameters
-module (mas).
-export ([start/5]).
-export_type([agent/0,
agent/1,
sim_params/0,
sim_params/1,
agent_behaviour/0,
agent_behaviour/1]).
-include ("mas.hrl").
... | %% @doc This module starts the mas framework with given environment, model and parameters
-module (mas).
-export ([start/5]).
-export_type([agent/0,
agent/1,
sim_params/0,
sim_params/1,
agent_behaviour/0,
agent_behaviour/1]).
-include ("mas.hrl").
... | Stop using file for configuation. | Stop using file for configuation.
| Erlang | mit | ParaPhraseAGH/erlang-mas |
4a27218306c67c670473d67b3719d26cec392e2a | src/bucket_bouncer_server_sup.erl | src/bucket_bouncer_server_sup.erl | %% -------------------------------------------------------------------
%%
%% Copyright (c) 2007-2012 Basho Technologies, Inc. All Rights Reserved.
%%
%% -------------------------------------------------------------------
-module(bucket_bouncer_server_sup).
-behaviour(supervisor).
%% API
-export([start_link/0]).
%%... | %% -------------------------------------------------------------------
%%
%% Copyright (c) 2007-2012 Basho Technologies, Inc. All Rights Reserved.
%%
%% -------------------------------------------------------------------
-module(bucket_bouncer_server_sup).
-behaviour(supervisor).
%% API
-export([start_link/0]).
%%... | Change the server restart strategy to permanent. | Change the server restart strategy to permanent.
| Erlang | apache-2.0 | basho/stanchion,sdebnath/stanchion |
76b32ea39a944585155f8f5fcab407f8e0b968b1 | src/erlcfg_data.erl | src/erlcfg_data.erl | -module(erlcfg_data, [Node]).
-export([
raw/0,
get/1,
get/2
]).
raw() ->
Node.
get(Key, Default) ->
case THIS:get(Key) of
{error, _Reason} ->
Default;
Value ->
Value
end.
get(Key) ->
case erlcfg_node:get(Node, Key) of
{not_f... | -module(erlcfg_data, [Node]).
-export([
raw/0,
get/1,
get/2,
ensure_get/1
]).
raw() ->
Node.
get(Key, Default) ->
case THIS:get(Key) of
{error, _Reason} ->
Default;
Value ->
Value
end.
get(Key) ->
case erlcfg_node:get(Node, ... | Implement erlcfg:ensure_get/1 which crashes when key is not found | Implement erlcfg:ensure_get/1 which crashes when key is not found
| Erlang | bsd-3-clause | saleyn/erlcfg |
2c727cfceed69f39d6377f9cf0967d2bcd0dfa1c | src/engine/similar_data.hrl | src/engine/similar_data.hrl | %%%-------------------------------------------------------------------
%%% File : similar_data.hrl
%%% Author : Nicolas R Dufour <nrdufour@gmail.com>
%%% Created : 2009/05/19
%%% Description :
%%% Basic record containing the simulation data.
%%%
%%% Copyright 2009 Nicolas R Dufour <nrdufour@gmail.com>
%%%
%%% This ... | %%%-------------------------------------------------------------------
%%% File : similar_data.hrl
%%% Author : Nicolas R Dufour <nrdufour@gmail.com>
%%% Created : 2009/05/19
%%% Description :
%%% Basic record containing the simulation data.
%%%
%%% Copyright 2009 Nicolas R Dufour <nrdufour@gmail.com>
%%%
%%% This ... | Add a record to carry a singular event. | Add a record to carry a singular event.
| Erlang | mit | nrdufour/similar |
4bfac28b728ad22e7c6b3ed0fc7e7f9f714355c7 | test/iota_api_checks_tests.erl | test/iota_api_checks_tests.erl | -module(iota_api_checks_tests).
-include_lib("eunit/include/eunit.hrl").
internal_consistency_test_() ->
EmptyResults = iota_result:new(foo),
ExpectedWarning = iota_errors:emit_warning(EmptyResults,
foo, {api, unrestricted_api}),
[ ?_assertMatch(ExpectedWarning,
... | -module(iota_api_checks_tests).
-include_lib("eunit/include/eunit.hrl").
internal_consistency_test_() ->
EmptyResults = iota_result:new(),
ExpectedWarning = iota_errors:emit_warning(EmptyResults,
foo, {api, unrestricted_api}),
[ ?_assertMatch(ExpectedWarning,
... | Fix call to iota_result:new in unit test | Fix call to iota_result:new in unit test
| Erlang | mit | jpgneves/iota |
326a634be67da1de96a21bfaaef8afc19652d35b | src/floppy_coord_sup.erl | src/floppy_coord_sup.erl | %% @doc Supervise coord fsm.
-module(floppy_coord_sup).
-behavior(supervisor).
-export([start_fsm/1,
start_link/0]).
-export([init/1]).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
start_fsm(Args) ->
supervisor:start_child(?MODULE, Args).
init([]) ->
Worker = {floppy_... | %% @doc Supervisor for the coordinator FSMs.
%%
-module(floppy_coord_sup).
-behavior(supervisor).
-export([start_fsm/1,
start_link/0]).
-export([init/1]).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
start_fsm(Args) ->
supervisor:start_child(?MODULE, Args).
init([]) ->
... | Add documentation for coordinator FSM. | Add documentation for coordinator FSM.
| Erlang | apache-2.0 | ergl/antidote,SyncFree/antidote |
c455f0a48666f726fa8f522c969cd6b01ac380cd | modules/mod_ginger_base/support/ginger_config.erl | modules/mod_ginger_base/support/ginger_config.erl | -module(ginger_config).
-author("Driebit <tech@driebit.nl").
-export([
install_config/1
]).
-include_lib("zotonic.hrl").
%% @doc Set preferred default config (but don't overwrite if already set)
-spec install_config(#context{}) -> ok.
install_config(Context) ->
lists:foreach(
fun({Mod, Key, Value}) -... | -module(ginger_config).
-author("Driebit <tech@driebit.nl").
-export([
install_config/1
]).
-include_lib("zotonic.hrl").
%% @doc Set preferred default config (but don't overwrite if already set)
-spec install_config(#context{}) -> ok.
install_config(Context) ->
lists:foreach(
fun({Mod, Key, Value}) -... | Set Dutch as default site language | [base] Set Dutch as default site language
| Erlang | apache-2.0 | driebit/ginger,driebit/ginger,driebit/ginger |
d6ba999a70d8e5c3042db052de079c9c195f9dfc | src/teles_data_manager_sup.erl | src/teles_data_manager_sup.erl | -module(teles_data_manager_sup).
-behaviour(supervisor).
-export([start_link/1, init/1, start_agents/2]).
start_link(NumAgents) ->
supervisor:start_link({local, ?MODULE}, ?MODULE, [NumAgents]).
init([NumAgents]) ->
Manager = {data_manager, {teles_data_manager, start_link, [NumAgents]},
permanent, ... | -module(teles_data_manager_sup).
-behaviour(supervisor).
-export([start_link/1, init/1, start_agents/2, start_agent/2]).
start_link(NumAgents) ->
supervisor:start_link({local, ?MODULE}, ?MODULE, [NumAgents]).
init([NumAgents]) ->
Manager = {data_manager, {teles_data_manager, start_link, [NumAgents]},
... | Split start_agents into 2, so you can start a single agent | Split start_agents into 2, so you can start a single agent
| Erlang | bsd-3-clause | armon/teles,armon/teles |
519001bcbbf3625bb66adfba85e2c02e12ce4e37 | exercises/rna-transcription/test/rna_transcription_tests.erl | exercises/rna-transcription/test/rna_transcription_tests.erl | -module(rna_transcription_tests).
-define(TESTED_MODULE, (sut(rna_transcription))).
-define(TEST_VERSION, 1).
-include("exercism.hrl").
transcribes_cytidine_unchanged_test() ->
?assertEqual("C", ?TESTED_MODULE:to_rna("G")).
transcribes_guanosine_unchanged_test() ->
?assertEqual("G", ?TESTED_MODULE:to_rna("C")).... | -module(rna_transcription_tests).
-define(TESTED_MODULE, (sut(rna_transcription))).
-define(TEST_VERSION, 1).
-include("exercism.hrl").
transcribes_cytidine_to_guanosine_test() ->
?assertEqual("C", ?TESTED_MODULE:to_rna("G")).
transcribes_guanosine_to_cytidine_test() ->
?assertEqual("G", ?TESTED_MODULE:to_rna("... | Change the name of tests | Change the name of tests
These weren't accurate. They should reflect the fact that we are transcribing not just converting from DNA to RNA bases. See the actual expected values. | Erlang | mit | NobbZ/xerlang,exercism/xerlang |
ebe8d73cc0cf0fb69b6d68e6b8c7f53f081e78fe | apps/aesophia/test/aeso_compiler_tests.erl | apps/aesophia/test/aeso_compiler_tests.erl | %%% -*- erlang-indent-level:4; indent-tabs-mode: nil -*-
%%%-------------------------------------------------------------------
%%% @copyright (C) 2018, Aeternity Anstalt
%%% @doc Test Sophia language compiler.
%%%
%%% @end
%%%-------------------------------------------------------------------
-module(aeso_compiler_te... | %%% -*- erlang-indent-level:4; indent-tabs-mode: nil -*-
%%%-------------------------------------------------------------------
%%% @copyright (C) 2018, Aeternity Anstalt
%%% @doc Test Sophia language compiler.
%%%
%%% @end
%%%-------------------------------------------------------------------
-module(aeso_compiler_te... | Add oracles.aes test Sophia contract among compilation unit tests | Add oracles.aes test Sophia contract among compilation unit tests
| Erlang | isc | aeternity/epoch,aeternity/epoch,aeternity/epoch,aeternity/epoch |
c584df2f1f7dcf00b86085aa5cd37cb60cf9e4b0 | modules/mod_ginger_rdf/support/ginger_rdf_search.erl | modules/mod_ginger_rdf/support/ginger_rdf_search.erl | %% @doc RDF searches through linked data
%% @author David de Boer <david@driebit.nl>
-module(ginger_rdf_search).
-export([
search_query/2
]).
-include_lib("zotonic.hrl").
-include_lib("../include/rdf.hrl").
%% @doc Search in linked data sources and return results as sets of RDF triples
-spec search_query(#search... | %% @doc RDF searches through linked data
%% @author David de Boer <david@driebit.nl>
-module(ginger_rdf_search).
-export([
search_query/2
]).
-include_lib("zotonic.hrl").
-include_lib("../include/rdf.hrl").
%% @doc Search in linked data sources and return results as sets of RDF triples
-spec search_query(#search... | Fix Unknown search query {rdf, ...} | [rdf] Fix Unknown search query {rdf, ...}
Just return an empty search result if no observe_rdf_search function is
defined on the site-level.
| Erlang | apache-2.0 | driebit/ginger,driebit/ginger,driebit/ginger |
718e2f6955a8ef1dffaab3fbbd23a3813eaf1004 | lib/erlang/src/router/rest/app_controllers/nodes_controller.erl | lib/erlang/src/router/rest/app_controllers/nodes_controller.erl | %%%-------------------------------------------------------------------
%%% File : node_controller.erl
%%% Author : Ari Lerner
%%% Description :
%%%
%%% Created : Fri Nov 13 11:43:49 PST 2009
%%%-------------------------------------------------------------------
-module (nodes_controller).
-include ("router.hrl")... | %%%-------------------------------------------------------------------
%%% File : node_controller.erl
%%% Author : Ari Lerner
%%% Description :
%%%
%%% Created : Fri Nov 13 11:43:49 PST 2009
%%%-------------------------------------------------------------------
-module (nodes_controller).
-include ("router.hrl")... | Structure nodes json response (TODO: update this) | Structure nodes json response (TODO: update this) | Erlang | mit | auser/beehive,auser/beehive,auser/beehive,edwardt/git-stuff-ref,edwardt/git-stuff-ref,edwardt/git-stuff-ref |
fa64275fc7209ddb64b1a0e9bd43b781ccc0b12f | src/echo.erl | src/echo.erl | -module(echo).
-behaviour(gen_server).
-behaviour(proto_handler).
-export([start/2, send_msg/2]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]).
-record(state, {parent, name}).
start(Config, Parent) ->
gen_server:start_link(echo, {Config, Parent}, []).
send_msg(Pid, Msg... | Add simple proto_handler that prints all messages to stdout | Add simple proto_handler that prints all messages to stdout
| Erlang | bsd-2-clause | gelraen/chathub | |
e804fee81f784919cf554bb36a0427b2cc0a95af | split/split2/split2.erl | split/split2/split2.erl | -module(split2).
-include_lib("eunit/include/eunit.hrl").
-export([split/1]).
split_even_list_test() ->
?assertEqual({[1,2], [3,4]}, split([1,2,3,4])).
split_odd_list_test() ->
?assertEqual({[a], [b,c]}, split([a,b,c])).
split_empty_list_test() ->
?assertEqual({[],[]}, split([])).
split_one_elm_list_test()... | Split - split a list into two sub-lists with elementes distributed | Split - split a list into two sub-lists with elementes distributed
| Erlang | mit | tonight-halfmoon/slv-n-erlang,tonight-halfmoon/slv-n-erlang | |
d2b1fd73230a75bf4532e881ed0b1355feb2fff2 | src/enet_codec_tests.erl | src/enet_codec_tests.erl | %% @copyright Geoff Cant
%% @author Geoff Cant <nem@erlang.geek.nz>
%% @version {@vsn}, {@date} {@time}
%% @doc enet_codec eunit tests.
%% @end
-module(enet_codec_tests).
-include_lib("eunit/include/eunit.hrl").
udp_encode_test() ->
WireData = <<255,255,255,255,255,255,110,203,203,23,242,100,8,
... | Add a UDP roundtrip encoding eunit test for enet_codec. | Add a UDP roundtrip encoding eunit test for enet_codec.
| Erlang | bsd-3-clause | pvalsecc/enet,Feuerlabs/enet,pvalsecc/enet,archaelus/enet,archaelus/enet | |
9614c8f482512c5b4f1f57dbd78c1334254fcaa5 | src/wilcog_path_tree.erl | src/wilcog_path_tree.erl | -module(wilcog_path_tree).
-export([build_tree/1, build_tree/2]).
build_tree(Path)->
NewTree = gb_trees:empty(),
PathProperties = [{"path", Path}],
RootTree = gb_trees:enter(Path, PathProperties, NewTree),
build_tree(Path, RootTree).
build_tree(Path, Tree)->
{ok, Items} = file:list_dir_all(Path),
ItemMap... | Add dir tree builder using gb_trees | Add dir tree builder using gb_trees
| Erlang | mit | HashNuke/rotor | |
8831a668540630837e19779e52f194afa3fe7343 | src/em_map.erl | src/em_map.erl | %%
%% em_map.erl
%%
%% Easymmo map manager (users can be located in one map.)
-module(npc_pool).
-include_lib("amqp_client.hrl").
-export([start_link/3]).
-export([terminate/2]).
-export([init/1]).
-export([handle_info/2]).
start_link(ServerIp, ToClientEx, FromClientEx) ->
gen_server:start_link({local, ?MODULE}, ?M... | Add map manager module. (not implemented anything!) | Add map manager module. (not implemented anything!)
| Erlang | apache-2.0 | masatoshiitoh/easymmo | |
6dae5b2d1ab9a6914b88f92460e6a106d2d5c1ce | src/riak_moss_manifest.erl | src/riak_moss_manifest.erl | %% -------------------------------------------------------------------
%%
%% Copyright (c) 2007-2011 Basho Technologies, Inc. All Rights Reserved.
%%
%% -------------------------------------------------------------------
%% @doc Module for choosing and manipulating lists (well, orddict) of manifests
-module(riak_mos... | Add skeleton for list-of-manifest manipulation module | Add skeleton for list-of-manifest manipulation module
S24
| Erlang | apache-2.0 | basho/riak_cs,basho/riak_cs,GabrielNicolasAvellaneda/riak_cs,laurenrother/riak_cs,laurenrother/riak_cs,basho/riak_cs_report,sdebnath/riak_cs,yangchengjian/riak_cs,dragonfax/riak_cs,yangchengjian/riak_cs,basho/riak_cs,dragonfax/riak_cs,GabrielNicolasAvellaneda/riak_cs,dragonfax/riak_cs,GabrielNicolasAvellaneda/riak_cs,y... | |
eb7c2c821404f7162c506b3af3daf0221036da50 | upgrades/v58_v59/live_upgrade.erl | upgrades/v58_v59/live_upgrade.erl | f(UpgradeNode).
UpgradeNode = fun () ->
case logplex_app:config(git_branch) of
"v58" ->
io:format(whereis(user), "at=upgrade_start cur_vsn=58~n", []);
"v59" ->
io:format(whereis(user),
"at=upgrade type=retry cur_vsn=58 old_vsn=59~n", []);
Else ->
io:... | Upgrade path for v58 -> v59 | Upgrade path for v58 -> v59
| Erlang | mit | mkrysiak/logplex,voidlock/logplex,srid/logplex | |
840ee0cfc57829613aebc6cf7cb604fa5403bff5 | apps/aebytecode/test/aebytecode_SUITE.erl | apps/aebytecode/test/aebytecode_SUITE.erl | -module(aebytecode_SUITE).
%% common_test exports
-export([ all/0 ]).
%% test case exports
-export([ roundtrip_identy/1 ]).
-include_lib("common_test/include/ct.hrl").
all() ->
[ roundtrip_identy ].
roundtrip_identy(_Cfg) ->
CodeDir = code:lib_dir(aebytecode, test),
FileName = filename:join(CodeDir, "a... | Add a simple test case | Add a simple test case
| Erlang | isc | aeternity/epoch,aeternity/epoch,aeternity/epoch,aeternity/epoch | |
52f048ddf7d9a973386ca240e5a94d866fa1915a | test/chloe_session_test.erl | test/chloe_session_test.erl | -module(chloe_session_test).
-include_lib("eunit/include/eunit.hrl").
send_to_browser_test() ->
{ok, MockPid} = gen_server_mock:new(),
gen_server_mock:expect_cast(MockPid, fun({send, "some test data"}, State) ->
{ok, State}
end),
{ok, SessionPid} = chloe_session:start_link(MockPid... | Test that we send data to the browser | Test that we send data to the browser
| Erlang | mit | mashion/chloe,mashion/chloe,mashion/chloe | |
9e789305828119401788636ad3c20b6602654713 | test/riak_moss_put_fsm_test.erl | test/riak_moss_put_fsm_test.erl | %% -------------------------------------------------------------------
%%
%% Copyright (c) 2007-2011 Basho Technologies, Inc. All Rights Reserved.
%%
%% -------------------------------------------------------------------
-module(riak_moss_put_fsm_test).
-include("riak_moss.hrl").
-include_lib("eunit/include/eunit.hr... | Add basic put fsm test | Add basic put fsm test
This test currently
hits Riak. The next step
will be to use both a
manifest_fsm and blocks_server
that don't really touch Riak
| Erlang | apache-2.0 | dragonfax/riak_cs,basho/riak_cs,laurenrother/riak_cs,yangchengjian/riak_cs,yangchengjian/riak_cs,laurenrother/riak_cs,sdebnath/riak_cs,basho/riak_cs,GabrielNicolasAvellaneda/riak_cs,yangchengjian/riak_cs,GabrielNicolasAvellaneda/riak_cs,basho/riak_cs,dragonfax/riak_cs,yangchengjian/riak_cs,GabrielNicolasAvellaneda/riak... | |
d2bf79d61278e339a6f11cce83fad1aade0c4546 | test/riak_moss_get_fsm_test.erl | test/riak_moss_get_fsm_test.erl | %% -------------------------------------------------------------------
%%
%% Copyright (c) 2007-2011 Basho Technologies, Inc. All Rights Reserved.
%%
%% -------------------------------------------------------------------
-module(riak_moss_get_fsm_test).
-export([get_fsm_test_/0]).
-include_lib("eunit/include/eunit.... | Add skeleton test for the get fsm | Add skeleton test for the get fsm
AZ940
| Erlang | apache-2.0 | basho/riak_cs_report,GabrielNicolasAvellaneda/riak_cs,sdebnath/riak_cs,dragonfax/riak_cs,basho/riak_cs,yangchengjian/riak_cs,sdebnath/riak_cs,sdebnath/riak_cs,basho/riak_cs,yangchengjian/riak_cs,basho/riak_cs,GabrielNicolasAvellaneda/riak_cs,sdebnath/riak_cs,laurenrother/riak_cs,dragonfax/riak_cs,basho/riak_cs_lfs,Gabr... | |
c65a916b9c32cd568d1cb356e4d0c9d73655492f | euler/1/erlang/nod/optimised.erl | euler/1/erlang/nod/optimised.erl | -module(optimised).
-export([sum/1]).
maximumSum(N, M) ->
N div M.
% Could be rewritten to SUM's but for functional programming I think it's same ))
list(Count, X)->
[ N * X || N <- lists:seq(1, maximumSum(Count - 1, X)) ].
sum(Count) ->
lists:sum(lists:umerge(list(Count, 3), list(Count, 5))).
| Add more optimal version, N1, Euler | Add more optimal version, N1, Euler
| Erlang | apache-2.0 | davit-khaburdzania/euler,davit-khaburdzania/euler,davit-khaburdzania/euler | |
12325306679c695ddcecd3ce2e5843fd0958ad8e | src/bookshelf_fs.erl | src/bookshelf_fs.erl | %% @copyright 2012 Opscode, Inc. All Rights Reserved
%% @author Tim Dysinger <timd@opscode.com>
%%
%% Licensed to the Apache Software Foundation (ASF) under one or more
%% contributor license agreements. See the NOTICE file distributed
%% with this work for additional information regarding copyright
%% ownership. The... | Add a file system 'backend' | Add a file system 'backend'
| Erlang | apache-2.0 | charlesjohnson/chef-server,poliva83/chef-server,stephenbm/chef-server,Minerapp/chef-server,Minerapp/chef-server,chef/bookshelf,juliandunn/chef-server-1,itmustbejj/chef-server,itmustbejj/chef-server,poliva83/chef-server,rmoorman/chef-server,Minerapp/chef-server,vladuemilian/chef-server,Minerapp/chef-server,chef/chef-ser... | |
d31939f6cc0198b1427ea2073d503e8354d9b1de | test/unload_test.erl | test/unload_test.erl | -module(unload_test).
-export([unload_test/0]).
unload_test() ->
code:delete(fast_yaml),
code:purge(fast_yaml),
code:load_file(fast_yaml). | Add test that will unload nif, this should make gcov save it's result | Add test that will unload nif, this should make gcov save it's result
| Erlang | apache-2.0 | processone/fast_yaml | |
5b3289d3ee9709df69aa2eb9b22a7b5de9d4c43d | torrent_piecemap.erl | torrent_piecemap.erl | -module(torrent_piecemap).
-behaviour(gen_server).
-export([start_link/1, init/1, handle_call/3, handle_cast/2, code_change/3, handle_info/2]).
-export([terminate/2]).
start_link(Amount) ->
gen_server:start_link(torrent_piecemap, Amount, []).
init(NumberOfPieces) ->
PieceTable = initialize_piece_table(Number... | Add some naive piecemap code | Add some naive piecemap code
| Erlang | bsd-2-clause | jlouis/etorrent,beni55/etorrent | |
6343efd6768a3d4d4ff2c6e1b22200f4e4aaca3f | test/couch_mrview_ddoc_validation_tests.erl | test/couch_mrview_ddoc_validation_tests.erl | % 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 ... | Add tests for design document validations | Add tests for design document validations
COUCHDB-537
| Erlang | apache-2.0 | fkaempfer/couchdb,fkaempfer/couchdb,fkaempfer/couchdb,fkaempfer/couchdb,fkaempfer/couchdb,fkaempfer/couchdb | |
2da9332efa1ee024bfa0e6fa13f758f00164e5e9 | src/derflow_riak_kv_integration.erl | src/derflow_riak_kv_integration.erl | -module(derflow_riak_kv_integration).
-author("Christopher Meiklejohn <cmeiklejohn@basho.com>").
-export([postcommit_log_object/1]).
%% @doc Trigger a log message when postcommit hook is triggered.
postcommit_log_object(Object) ->
lager:info("Postcommit hook triggered for ~p", [Object]).
| Add start of riak_kv integration. | Add start of riak_kv integration.
Add a post-commit hook and ensure riak_kv picks it up to begin testing.
| Erlang | apache-2.0 | ergl/lasp,lasp-lang/lasp,ergl/lasp,ergl/lasp,lasp-lang/lasp,ergl/lasp,lasp-lang/lasp,lasp-lang/lasp | |
b06161bde1f9963e20ec6e29c8f6b00d75b0b6dc | riak_test/append_test.erl | riak_test/append_test.erl | -module(append_test).
-export([confirm/0]).
-include_lib("eunit/include/eunit.hrl").
-define(HARNESS, (rt_config:get(rt_harness))).
confirm() ->
[Nodes] = rt:build_clusters([1]),
lager:info("Waiting for ring to converge."),
rt:wait_until_ring_converged(Nodes),
Node = hd(Nodes),
WriteResult = ... | Add test to exercise simple append. | Add test to exercise simple append.
Add a test which exercises a simple append operation and ensures the
operation succeeds.
| Erlang | apache-2.0 | ergl/antidote,SyncFree/antidote | |
e765d98122f38ef7758adf9a3b122024af0df98e | src/rayactor_color.erl | src/rayactor_color.erl | %%% This file is part of the RayActor Lighting Software.
%%%
%%% RayActor is free software: you can redistribute it and/or modify it under
%%% the terms of the GNU Affero General Public License as published by the Free
%%% Software Foundation, either version 3 of the License, or (at your option)
%%% any later version.
... | Add a small color library | Add a small color library
This is useful for mixing colors and to hide color information behind a
semi-opaque type.
Signed-off-by: aszlig <ee1aa092358634f9c53f01b5a783726c9e21b35a@redmoonstudios.org>
| Erlang | agpl-3.0 | aszlig/rayactor | |
a53bc5b1a4d4ccc1d9988d493e9931963f02a6bb | upgrades/v64_v65/live_upgrade.erl | upgrades/v64_v65/live_upgrade.erl | f(UpgradeNode).
UpgradeNode = fun () ->
case logplex_app:config(git_branch) of
"v64" ->
io:format(whereis(user), "at=upgrade_start cur_vsn=64~n", []);
"v65" ->
io:format(whereis(user),
"at=upgrade type=retry cur_vsn=64 old_vsn=65~n", []);
Else ->
io:... | Cut v65 release branch and add upgrade. | Cut v65 release branch and add upgrade. | Erlang | mit | srid/logplex,mkrysiak/logplex,voidlock/logplex | |
51e5e47ea7b082ab76fa33f2871ad6f215673eb7 | test/erlson_shell_test.erl | test/erlson_shell_test.erl | %% Copyright (c) 2011 Anton Lavrik, http://github.com/alavrik
%%
%% 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 u... | Add test for Erlson parser for Erlang shell | Add test for Erlson parser for Erlang shell
| Erlang | mit | alavrik/erlson,alertlogic/erlson | |
64f4ffdcd9eeb1fdb9b68d632d1cc4887a43d072 | src/riak_moss_manifest.erl | src/riak_moss_manifest.erl | %% -------------------------------------------------------------------
%%
%% Copyright (c) 2007-2011 Basho Technologies, Inc. All Rights Reserved.
%%
%% -------------------------------------------------------------------
%% @doc Module for choosing and manipulating lists (well, orddict) of manifests
-module(riak_mos... | Add skeleton for list-of-manifest manipulation module | Add skeleton for list-of-manifest manipulation module
S24
| Erlang | apache-2.0 | dragonfax/riak_cs,laurenrother/riak_cs,dragonfax/riak_cs,sdebnath/riak_cs,dragonfax/riak_cs,basho/riak_cs,GabrielNicolasAvellaneda/riak_cs,yangchengjian/riak_cs,yangchengjian/riak_cs,basho/riak_cs_lfs,sdebnath/riak_cs,sdebnath/riak_cs,GabrielNicolasAvellaneda/riak_cs,GabrielNicolasAvellaneda/riak_cs,GabrielNicolasAvell... | |
5da515c4832854ef556388ea03c4c9dab2cdaacd | migrations/5_each_metric_in_separate_file.escript | migrations/5_each_metric_in_separate_file.escript | #!/usr/bin/env escript
main([BenchDir]) ->
MetricsFile = filename:join(BenchDir, "metrics.txt"),
OutputFilePattern = filename:join(BenchDir, "metrics_~s.txt"),
case file:open(MetricsFile, [raw, binary, read]) of
{ok, H} ->
_ = parse_file(H, OutputFilePattern, _State = #{}),
... | Add migration for metrics storage reengineering | Add migration for metrics storage reengineering
| Erlang | bsd-3-clause | MrAlone/mzbench,machinezone/mzbench,timofey-barmin/mzbench,machinezone/mzbench,timofey-barmin/mzbench,machinezone/mzbench,MrAlone/mzbench,timofey-barmin/mzbench,MrAlone/mzbench,machinezone/mzbench,timofey-barmin/mzbench,MrAlone/mzbench,timofey-barmin/mzbench,machinezone/mzbench,MrAlone/mzbench | |
a3441a798e8428280cfabe56fa167a56f3c27b04 | riak_test/floppy_log.erl | riak_test/floppy_log.erl | -module(floppy_log).
-export([confirm/0]).
-include_lib("eunit/include/eunit.hrl").
-define(HARNESS, (rt_config:get(rt_harness))).
confirm() ->
mult_writes_one_read().
mult_writes_one_read() ->
N = 3,
ListIds = [random:uniform(N) || _ <- lists:seq(1, 10)],
[Nodes] = rt:build_clusters(... | Reformat file to correct whitespace. | Reformat file to correct whitespace.
| Erlang | apache-2.0 | ergl/antidote,SyncFree/antidote | |
6b830686427836c764444ddd7df8477c542f129f | src/erlang/lib/dnsresolvd.erl | src/erlang/lib/dnsresolvd.erl | %
% src/erlang/lib/dnsresolvd.erl
% =============================================================================
% DNS Resolver Daemon (dnsresolvd). Version 0.1
% =============================================================================
% A daemon that performs DNS lookups for the given hostname
% passed in an HTT... | Introduce main --application-- module of the daemon, rudimentary for the moment. | cowboy/erlang: Introduce main --application-- module of the daemon, rudimentary for the moment.
| Erlang | mit | rgolubtsov/dnsresolvd-multilang,rgolubtsov/dnsresolvd-multilang,rgolubtsov/dnsresolvd-multilang,rgolubtsov/dnsresolvd-multilang,rgolubtsov/dnsresolvd-multilang,rgolubtsov/dnsresolvd-multilang,rgolubtsov/dnsresolvd-multilang | |
70f94e913496ffae2ca134c25f09cd74a92d9b52 | src/oauth1_callback.erl | src/oauth1_callback.erl | -module(oauth1_callback).
-export_type(
[ t/0
]).
-export(
[ cons/2
, set_token_and_verifier/3
, get_uri/1
, store/1
, fetch/1
]).
-record(t,
{ token :: oauth1_credentials:id(tmp)
, uri :: oauth1_uri:t()
}).
-opaque t() ::
#t{}.
-define(STORAGE_BUCKET_NAME, <<"o... | Implement client callback management abstraction. | Implement client callback management abstraction.
| Erlang | mit | ibnfirnas/oauth1_core | |
efd4e2b489e0782a9f5c3c5c89baba871039e6e4 | test/dk_yaws_server_tests.erl | test/dk_yaws_server_tests.erl | %%%------------------------------------------------------------------------------
%%% @copyright (c) 2011, DuoMark International, Inc. All rights reserved
%%% @author Jay Nelson <jay@duomark.com>
%%% @doc
%%% Verify that dk_yaws_server instantiates and operates properly.
%%% @since v0.1.1
%%% @end
%%%---------------... | Create initial skeleton for dk_yaws_server unit tests | Create initial skeleton for dk_yaws_server unit tests
| Erlang | bsd-2-clause | duomark/dk_yaws | |
2a29dbe777b5278f229c5b0623e109c26eb9a2fc | src/riak_moss_wm_user.erl | src/riak_moss_wm_user.erl | %% -------------------------------------------------------------------
%%
%% Copyright (c) 2007-2011 Basho Technologies, Inc. All Rights Reserved.
%%
%% -------------------------------------------------------------------
-module(riak_moss_wm_user).
| Add empty user wm resource | Add empty user wm resource
AZ881
| Erlang | apache-2.0 | basho/riak_cs,dragonfax/riak_cs,yangchengjian/riak_cs,dragonfax/riak_cs,yangchengjian/riak_cs,GabrielNicolasAvellaneda/riak_cs,yangchengjian/riak_cs,sdebnath/riak_cs,dragonfax/riak_cs,yangchengjian/riak_cs,basho/riak_cs_report,GabrielNicolasAvellaneda/riak_cs,dragonfax/riak_cs,basho/riak_cs,laurenrother/riak_cs,laurenr... | |
a4e34a3d4493a0c853efa4123f3cdca4c9b6d690 | test/riak_moss_wm_key_test.erl | test/riak_moss_wm_key_test.erl | %% -------------------------------------------------------------------
%%
%% Copyright (c) 2007-2011 Basho Technologies, Inc. All Rights Reserved.
%%
%% -------------------------------------------------------------------
-module(riak_moss_wm_key_test).
-export([key_test_/0]).
-include("riak_moss.hrl").
-include_lib... | %% -------------------------------------------------------------------
%%
%% Copyright (c) 2007-2011 Basho Technologies, Inc. All Rights Reserved.
%%
%% -------------------------------------------------------------------
-module(riak_moss_wm_key_test).
-export([key_test_/0]).
-include("riak_moss.hrl").
-include_lib... | Add failing key resource test | Add failing key resource test
AZ870
Test currently fails because of a bad
match on get_object.
| Erlang | apache-2.0 | laurenrother/riak_cs,dragonfax/riak_cs,sdebnath/riak_cs,laurenrother/riak_cs,GabrielNicolasAvellaneda/riak_cs,yangchengjian/riak_cs,basho/riak_cs_lfs,sdebnath/riak_cs,GabrielNicolasAvellaneda/riak_cs,yangchengjian/riak_cs,yangchengjian/riak_cs,yangchengjian/riak_cs,basho/riak_cs,dragonfax/riak_cs,laurenrother/riak_cs,b... |
8c8586e332a10ce528c9543aad68b43392cecd15 | common/check_module_version_last.erl | common/check_module_version_last.erl | % input: none
%
% op: check module is last
%
% e.g.: ./erl_expect -sname ejabberd@ebs-ali-beijing-5 common/check_module_version_last.erl
% true | false
echo(off),
MLs = [MPath || {_Name, MPath} <- code:all_loaded(), is_list(MPath)],
MLMs =lists:filter(fun(Val) -> string:str(Val, "message_store") =/= 0 end, MLs)... | Add check modules' version is lastest for node | Add check modules' version is lastest for node
| Erlang | mit | zhuxiangkui/erl_tool,zhuxiangkui/erl_tool,zhuxiangkui/erl_tool,zhuxiangkui/erl_tool,zhuxiangkui/erl_tool | |
a4e77b3995c21e915fbfde167f600ce116880b33 | src/mover_phase_2_prep_migration_callback.erl | src/mover_phase_2_prep_migration_callback.erl | -module(mover_phase_2_prep_migration_callback).
-export([
migration_init/0,
migration_type/0,
supervisor/0,
migration_start_worker_args/2,
error_halts_migration/0,
reconfigure_object/2,
migration_action/2,
next_object/0
]).
-include("mover.hrl").
-include... | Add phase_2_prep_migration that darklaunches orgs for containers / groups. | Add phase_2_prep_migration that darklaunches orgs for containers / groups.
It also sets phase_2_migration state to "holding" for orgs it darklaunches.
| Erlang | apache-2.0 | Minerapp/chef-server,juliandunn/chef-server-1,poliva83/chef-server,Minerapp/chef-server,Minerapp/chef-server,chef/chef-mover,chef/chef-server,marcparadise/chef-server,Minerapp/chef-server,juliandunn/chef-server-1,charlesjohnson/chef-server,marcparadise/chef-server,juliandunn/chef-server-1,rmoorman/chef-server,juliandun... | |
d0483a17575c8ebf0e4fc2ebe3250526fef055e2 | test/transaction_SUITE.erl | test/transaction_SUITE.erl | -module(transaction_SUITE).
-include_lib("common_test/include/ct.hrl").
-export([
all/0,
init_per_suite/1,
end_per_suite/1
]).
-export([
no_txn/1
]).
all() ->
[no_txn].
init_per_suite(Config) ->
erlang_v8:start(),
Vm = ev8:new_vm(),
C1 = ev8:new_context(Vm),
C2 = ev8:new_context(Vm),
[{vm, ... | Test case for the native erlang call problem. | Test case for the native erlang call problem.
| Erlang | mit | chromaticbum/erlang_v8,chromaticbum/erlang_v8,chromaticbum/erlang_v8 | |
67ef7d7d40d54454c22248410414ef26c7e18971 | examples.escript | examples.escript | #!/usr/bin/env escript
%%! -noinput -pa ../cecho/_build/default/lib/cecho/ebin +A 50
%% Read the LICENSE file
-include_lib("cecho/include/cecho.hrl").
main(["countdown"]) ->
cecho_example:countdown();
main(["simple"]) ->
cecho_example:simple();
main(["colors"]) ->
cecho_example:colors();
main(["input"]) ->
cec... | Add a script which allows running of any example. | Add a script which allows running of any example.
| Erlang | bsd-2-clause | mazenharake/cecho | |
2213410bb6ca1ed2758eb86460edbd87351c3387 | src/rayactor_dmx.erl | src/rayactor_dmx.erl | %%% This file is part of the RayActor Lighting Software.
%%%
%%% RayActor is free software: you can redistribute it and/or modify it under
%%% the terms of the GNU Affero General Public License as published by the Free
%%% Software Foundation, either version 3 of the License, or (at your option)
%%% any later version.
... | Add a small library for a dmx() data type | Add a small library for a dmx() data type
Currently, this is implemented on Erlang binaries and only has one
helper function set() and nothing more so far (more coming soon of
course).
The goal is to only use this library for handling DMX packets,
especially if it comes to only changing a subset of a packet.
We have... | Erlang | agpl-3.0 | aszlig/rayactor | |
6af2bcd2e6af08823738aeb6e1ca7d63dd329932 | modules/mod_base/services/service_base_media_upload.erl | modules/mod_base/services/service_base_media_upload.erl | %% @author Arjan Scherpenisse <arjan@scherpenisse.net>
%% @copyright 2012 Arjan Scherpenisse <arjan@scherpenisse.net>
%% Date: 2012-02-12
%% @doc Upload media items. Pass in the "file" argument for the actual file.
%% Copyright 2012 Arjan Scherpenisse
%%
%% Licensed under the Apache License, Version 2.0 (the "License... | Add /api/base/media_upload API access point, for uploading files. | Add /api/base/media_upload API access point, for uploading files.
| Erlang | apache-2.0 | erlanger-ru/erlanger-ru.meta,erlanger-ru/erlanger-ru.meta,erlanger-ru/erlanger-ru.meta,erlanger-ru/erlanger-ru.meta,erlanger-ru/erlanger-ru.meta | |
23ae8a0a444190bbc212c6f73b4ead539a3ecee5 | lib/eTorrent/src/torrent_pool_sup.erl | lib/eTorrent/src/torrent_pool_sup.erl | %%%-------------------------------------------------------------------
%%% File : torrent_pool_sup.erl
%%% Author : Jesper Louis Andersen <>
%%% Description : Supervisor for the pool of torrents
%%%
%%% Created : 13 Jul 2007 by Jesper Louis Andersen <>
%%%------------------------------------------------------------... | Add the pool supervisor code. | Add the pool supervisor code.
| Erlang | bsd-2-clause | beni55/etorrent,jlouis/etorrent | |
6b6de55fa2d8c49d3c25b3074b4248eb402d64f5 | src/etorrent_fs_janitor.erl | src/etorrent_fs_janitor.erl | -module(etorrent_fs_janitor).
-behaviour(gen_server).
-export([start_link/0, fs_collect/0]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
terminate/2, code_change/3]).
-define(HIGH, 128).
-define(LOW, 100).
-define(SERVER, ?MODULE).
-record(state, { high, low }).
%% Start a new janitor.
... | Introduce a bare-bones Janitorial process. | Introduce a bare-bones Janitorial process.
| Erlang | bsd-2-clause | beni55/etorrent,jlouis/etorrent | |
127d337f031229ad1fcb5df7cdd5302b43be5bb9 | apps/pushysim/src/pushysim_services.erl | apps/pushysim/src/pushysim_services.erl |
-module(pushysim_services).
-export([create_client/2]).
-include_lib("public_key/include/public_key.hrl").
%% Create a client in erchef and return {ok, PrivateKey} otherwise
%% an error tuple
-spec create_client(OrgName :: binary(),
NodeName :: binary()) -> {ok, rsa_private_key()} | {error, bina... | Implement client creation API call | Implement client creation API call
| Erlang | apache-2.0 | chef/opscode-pushy-simulator | |
78501b68792a8412b206318f793cb7e666562278 | test/bookshelf_fs_tests.erl | test/bookshelf_fs_tests.erl | %% @copyright 2012 Opscode, Inc. All Rights Reserved
%% @author Tim Dysinger <timd@opscode.com>
%%
%% Licensed to the Apache Software Foundation (ASF) under one or more
%% contributor license agreements. See the NOTICE file distributed
%% with this work for additional information regarding copyright
%% ownership. The... | Add a unit test for bookshelf_fs | Add a unit test for bookshelf_fs
| Erlang | apache-2.0 | vladuemilian/chef-server,juliandunn/chef-server-1,poliva83/chef-server,chef/chef-server,stephenbm/chef-server,stephenbm/chef-server,charlesjohnson/chef-server,Minerapp/chef-server,juliandunn/chef-server-1,juliandunn/chef-server-1,stephenbm/chef-server,vladuemilian/chef-server,chef/chef-server,chef/chef-server,vladuemil... | |
1c58fa8c87693776b161eb864f538c732c6a1d64 | erlang/books/erlang-and-otp-in-action/chapter-9/create_tables.erl | erlang/books/erlang-and-otp-in-action/chapter-9/create_tables.erl | -module(create_tables).
-export([ init_tables/0,
insert_user/3, insert_project/2 ]).
-record(user, { id, name }).
-record(project, { title, description }).
-record(contributor, { user_id, project_title }).
init_tables() ->
mnesia:create_table(user, [{attributes, record_info(fields, user)}]),
mnesia... | Create tables and inserting example. | Create tables and inserting example.
| Erlang | mit | afronski/playground-erlang,afronski/playground-erlang,afronski/playground-erlang,afronski/playground-erlang,afronski/playground-erlang |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.