Diary of an IT Guy

Heart passion to keep the brain moving>>>

LMS Down 3 Days

leave a comment »

It seems there is some DdoS attack.

Written by isal

5 February 2019 at 22:33

Posted in Uncategorized

Python: Line Plot Basic (1)

leave a comment »

With matplotlib, you can create a bunch of different plots in Python. The most basic plot is the line plot. A general recipe is given here.

import matplotlib.pyplot as plt

The world bank has estimates of the world population for the years 1950 up to 2100. The years are loaded in your workspace as a list called year, and the corresponding populations as a list called pop.

# Print the last item from year and pop
print (year[-1])
print (pop[-1])

# Import matplotlib.pyplot as plt
import matplotlib.pyplot as plt

# Make a line plot: year on the x-axis, pop on the y-axis
plt.plot (year,pop)

# Display the plot with plt.show()



Written by isal

20 January 2019 at 00:13

Posted in Data Science, Uncategorized

Tagged with ,

Latihan Numpy Array di Python (2019-01-19)

leave a comment »

In the last few exercises you’ve learned everything there is to know about heights and weights of baseball players. Now it’s time to dive into another sport: soccer.

You’ve contacted FIFA for some data and they handed you two lists. The lists are the following:

positions = ['GK', 'M', 'A', 'D', ...]
heights = [191, 184, 185, 180, ...]

Each element in the lists corresponds to a player. The first list, positions, contains strings representing each player’s position. The possible positions are: 'GK' (goalkeeper), 'M' (midfield), 'A' (attack) and 'D' (defense). The second list, heights, contains integers representing the height of the player in cm. The first player in the lists is a goalkeeper and is pretty tall (191 cm).

You’re fairly confident that the median height of goalkeepers is higher than that of other players on the soccer field. Some of your friends don’t believe you, so you are determined to show them using the data you received from FIFA and your newly acquired Python skills.

# heights and positions are available as lists

# Import numpy
import numpy as np

# Convert positions and heights to numpy arrays: np_positions, np_heights
np_positions = np.array(positions)
np_heights = np.array(heights)

# Heights of the goalkeepers: gk_heights
gk_heights = np.array(np_heights[np_positions=='GK'])
#print (gk_heights)

# Heights of the other players: other_heights
other_heights = np.array(np_heights[np_positions !='GK'])
#print (other_heights)

# Print out the median height of goalkeepers. Replace 'None'
print("Median height of goalkeepers: " + str(np.median(gk_heights)))

# Print out the median height of other players. Replace 'None'
print("Median height of other players: " + str(np.median(other_heights)))


Median height of goalkeepers: 188.0
Median height of other players: 181.0

Written by isal

19 January 2019 at 23:54

Posted in Data Science

Tagged with , ,

Top Five Data Science Domain

leave a comment »

Hello world Data Science!

Data Science Domains.pdf

Written by isal

18 January 2019 at 19:15

Madurasa Original: be aware. Ini madu palsu

leave a comment »

Lihat komposisinya :(Pantesan harganya murah meriah

Written by isal

6 May 2018 at 21:50

Posted in Uncategorized

Keep the healthy life

leave a comment »

Written by isal

18 January 2018 at 06:57

Posted in Kesehatan

Frisian Flag Purefarm Low Fat: Susu paling lezat

leave a comment »

Susu ini menurut saya paling lezat dibanding UltraMilk dan Diamond. Harganya juga terjangkau.So far sakit lutut saya lumayan berkurang. Saya konsumsi 2 hari sekali @200ml setiap mau ke kantor.

Written by isal

13 January 2018 at 05:07

%d bloggers like this: