Skip to content

Instantly share code, notes, and snippets.

View julioleitao's full-sized avatar

Júlio Leitão julioleitao

View GitHub Profile
defmodule Examples.Mail do
def status do
{:ok, :up_and_running}
end
def stop, do: {:ok, :stopped}
def send(from, to, message) do
"""
# integer
84
0x54 # In hexa representation: you can have other bases for your numbers.
# float
3.14
1.0e-2 # 0.01 - support the `e` for exponent values you can't put the float as `.14`. It is necessary
# a value at the left and the right of the `.``
# boolean
# how to declare a variable: <VARIABLE_NAME> = <VALUE>
# Example
answer = 42
# In Java, would be necessary to declare the type
# Example:
# int answer = 42;
ethnicity_level gender count
Africans F 678
Africans M 2150
British F 3825
British M 16466
EastEuropean F 1212
EastEuropean M 4914
GreaterEastAsian F 7814
GreaterEastAsian M 17648
IndianSubContinent F 2069
region gender count
Asian F 9883
Asian M 26092
GreaterAfrican F 2084
GreaterAfrican M 7081
GreaterEuropean F 12011
GreaterEuropean M 50950
name l0 l1 l2 gender
A Min Tjoa GreaterAfrican Africans \N -
A. A. Clark GreaterEuropean British \N -
A. Alfonso GreaterEuropean WestEuropean French -
A. Ali GreaterAfrican Muslim \N -
A. Ant Ozok Asian GreaterEastAsian Japanese -
A. Ardeshir Goshtasby GreaterEuropean British \N -
A. Basu Asian IndianSubContinent \N -
A. Beliz Saybasili GreaterAfrican Muslim \N -
A. Berger GreaterEuropean Jewish \N -