Skip to content

Instantly share code, notes, and snippets.

View stormwatch's full-sized avatar

Ezequiel Birman stormwatch

View GitHub Profile
@stormwatch
stormwatch / resume.json
Last active July 16, 2019 19:05
Résumé data
{
"basics": {
"name": "Ezequiel Birman",
"label": "Programmer",
"picture": "",
"email": "[email protected]",
"phone": "+549 11 36 38 83 12",
"website": "",
"summary": "0.999999999…× Engineer",
"location": {
[Trace - 02:01:34 ] Sending request 'initialize - (1)'.
Params: {
"processId": null,
"rootPath": "/usr/local/src/cursos/Erlang/2020 Thompson",
"clientInfo": {
"name": "emacs",
"version": "GNU Emacs 26.3 (build 1, x86_64-redhat-linux-gnu, GTK+ Version 3.24.13)\n of 2020-01-28"
},
"rootUri": "file:///usr/local/src/cursos/Erlang/2020%20Thompson",
"capabilities": {
-module(one15).
-export([xOr1/2, xOr2/2, xOr3/2, xOr4/2, xOr5/2, xOr6/2, xOr7/2, maxThree/3, howManyEqual/3, howManyEqual2/3, howManyEqual3/3]).
%% first example given by Prof. Thompson
xOr1(true, false) ->
true;
xOr1(false, true) ->
true;
xOr1(_,_) ->
false.
-module(perfect).
-export([perfect/1]).
perfect(N) ->
perfect(N, 2, 1).
perfect(N, D, Sum) when D * 2 < N, Sum < N ->
if
N rem D =:= 0 ->
@stormwatch
stormwatch / two8.erl
Last active May 23, 2020 03:17
2.8 Pulling it all together (second week assignment)
-module(two8).
-export([perimeter/1, area/1, enclose/1, bits/1, bits_tr/1]).
%% Shapes
%% Define a function perimeter/1 which takes a shape and returns the perimeter
%% of the shape.
%% Choose a suitable representation of triangles, and augment area/1 and
-module(two15).
-export([product/1, product_tr/1, maximum/1, maximum_tr/1]).
product([X]) ->
X;
product([X|Xs]) ->
X * product(Xs).
product_tr([X|Xs]) ->
-module(two18).
-export([double/1, double2/1, evens/1, evens2/1, median/1, count_elements/1, modes/1]).
%% Define an Erlang function double/1 to double the elements of a list of
%% numbers.
double([]) ->
[];
double([X | Xs]) ->
-module(index).
-export([create/1]).
create(Name) ->
{ok,File} = file:open(Name,[read]),
create(File, 1, #{}).
create(File, Line_number, Map) ->
case io:get_line(File,"") of
eof -> file:close(File),
-module(text).
-export(
[
format/1,
rio/0,
super/0,
take_line/1,
take_line/2,
take_paragraph/1,
-module(super).
-export([super/0]).
%% Comments on killing processes
%% 1. Without a supervisor:
%% evaluating ~exit(Pid,kill)~ kills Pid but the listener keeps looping.
%% If we were to kill the listener instead with ~exit(whereis(echo), kill)~ then