In [1]:
a = 5
b = 2a ^2 + 30a + 9
Out[1]:
In [5]:
using PyPlot
x = linspace(0,5)
y = cos(2x + 5)
plot(x,y, linewidth=2, linestyle = "--")
title("a nice cosinus")
xlabel("x axis")
ylabel("y axis")
Out[5]:
In [6]:
x = 1
y = 2
z = x + y
Out[6]:
In [7]:
code_llvm(f, (Int64,))
In [8]:
typeof(3.14)
Out[8]:
In [9]:
typeof("x")
Out[9]:
In [10]:
x = "this is a test"
typeof(x)
Out[10]:
In [11]:
y = 7
x + y
In [12]:
x = 3.5
x + y
Out[12]:
In [13]:
print_with_color(:red, "This is printed in red")
In [14]:
print_with_colour(:green, "This is green")
In [15]:
print_with_color(:green, "This is green")
In [1]:
x = 10
x = "hello"
Out[1]:
In [2]:
typemax(Int)
Out[2]:
In [3]:
s = "Hello, Julia"
Out[3]:
In [4]:
[1,2,3]
Out[4]:
In [7]:
#import Winston
import Gadfly
#Winston.plot(rand(4))
Gadfly.plot(x = [1:10], y = rand(10))
Out[7]:
In [8]:
using PyCall
pyeval("10*10")
Out[8]:
In [9]:
@pyimport math
math.sin(math.pi / 2)
Out[9]:
In [10]:
a = 42
clipboard(a)
workspace()
a
In [11]:
a = clipboard()
Out[11]:
In [12]:
fname="cofreewy.txt"
Out[12]:
In [13]:
data = readdlm(fname, '\t')
Out[13]:
In [15]:
using DataFrames
data2 = readdlm(fname, separator = '\t')
typeof(data2); size(data2)
In [16]:
typeof(data)
Out[16]:
In [17]:
using DataFrames
In [18]:
fname = "cofreey.txt"
Out[18]:
In [19]:
data = readtable(fname)
In [20]:
fname = "cofreewy.txt"
Out[20]:
In [21]:
data = readtable(fname)
Out[21]:
In [23]:
data = readtable(fname, separator = "\t")
In [24]:
data
Out[24]:
In [25]:
?readtable
In [26]:
help(readtable
)
In [27]:
fname2 = "health.csv"
Out[27]:
In [28]:
using DataFrames
data2 = readtable(fname, separator=",")
typeof(data2)
In [29]:
data2
Out[29]:
In [30]:
size(data2)
Out[30]:
In [38]:
using Gadfly
p = plot(data2[:CO], Geom.bar())
In [37]:
typeof(data2)
Out[37]:
In [ ]: