Data Analytics, Big Data and Blockchain (DABDB) course (code 25418)

Lecturer: Dr. Paolo Coletti Paolo.Colettiunibz.it . Office E203 - Office hours: www.paolocoletti.it/timetable
Website: www.paolocoletti.it/bigdata

Python 3 and Python 2

Issue Python 2 Python 3
print it is a command:
print string
it is a function, therefore it needs parentheses:
print(string)
print with trailing comma a trailing comma after print suppresses new line:
print string,
to suppress new line use:
print(string, end="")
integer division 5/2 gives 2. To get the float result:
either 5.0/2 or float(5)/2
5/2 gives 2.5
range function range function returns a list range function returns a range object. To get a list:
list(range(arguments))
xrange function xrange function returns a range object, like range in Python 3  

For the next lesson Tuesday 26 March 2019

Do the assignments on this file (it must be opened from inside Jupyter, learning where to put the file and how to open it is part of the homework) and send it to email to me. I do not know why the browser Edge is not able to download it as a file. In this lesson I arrived up to the practical calculation of simple daily rates of return (without doing the annualization nor the log rates of return).

For the next lesson Tuesday 19 March 2019

Do the assignments on this file (it must be opened from inside Jupyter, learning where to put the file and how to open it is part of the homework) and send it to email to me. I do not know why the browser Edge is not able to download it as a file. In this lesson I did video 09 bis, video 10, video 11 and a large part of video 12.

If you already watched video 09, now I have added to that video the part I explained in class on the 12 March and called it video 09 bis. If you are just looking for that part, it is this one: https://youtu.be/D2XMhi9uKAM

Mid-term on Tuesday 12 March 2019 14:00

First mid-term on the topics that we did up to the 6th March. It will be a couple of exercises, longer than the ones of the home assignments, that you will do on your own computer (so arrive with a working computer). Then lesson will start as usual with the oral presentations. It will be completely open book, open electronic material, open Google, open video, whatever you want. But please do not plan to copy nor communicate with somebody: I remind you that students caught copying are suspended for one year from this exam and skip the entire May-June-July session. And I already caught students in the past.

Hard training exercises for the mid-term (you do not need to send them to me):
- build a function which takes as parameter a dictionary and returns a list containing all the values corresponding to keys whose length is 3 or less. For example, submitting {"ab":7,"hgth":9,"efg":12} the function returns [7,12]. Hint: start with an empry list [ ] and append the right items
- build a function which takes as parameters two dictionaries and returns True if they have the same keys
- write a program which takes a string and builds another one with the letters in the opposite order, i.e. "Paolo" -> "oloaP"

Solutions are online... but please FIRST try to do them yourself.

For the next lesson Tuesday 12 March 2019

Do the assignments on this file (it must be opened from inside Jupyter, learning where to put the file and how to open it is part of the homework) and send it to email to me. I do not know why the browser Edge is not able to download it as a file.

For the next lesson Wednesday 6 March 2019

Do the assignments on this file (it must be opened from inside Jupyter, learning where to put the file and how to open it is part of the homework) and send it to email to me.

For the lesson Tuesday 5 March 2019

Do the assignments on this file (it must be opened from inside Jupyter, learning where to put the file and how to open it is part of the homework) and send it to email to me.

For the lesson Friday 1 March 2019

Do the assignments on this file (it must be opened from inside Jupyter, learning where to put the file and how to open it is part of the homework) and send it to email to me.

For the lesson Thursday 28 February 2019

Do the assignments on this file (it must be opened from inside Jupyter, learning where to put the file and how to open it is part of the homework) and send it to email to me.

Course

Recording

All the lessons will be recorded by university's technicians and made available on the internal section of unibz website. The head and tail of the lessons will be cut in such a way that no student appears in the video. In addition to this, you have, as usual, the videos of the lessons on YouTube prepared before by Paolo Coletti.

Prerequisites

In order to correctly follow this course each student is required previous knowledge on these topics:

Course content

How to study for this course

This course is different from the majority of courses you are used to. This course is much more technical than theoretical and it is strictly sequential. This means that you have to adapt your study strategy. First of all, you either attend all the lessons (or compensate for missing lessons watching immediately the corresponding videos or reading the book) or it is really not worth coming to the next one, since you will have a hard life understanding the next topic. Moreover, after each lesson you must repeat slowly on your own everything done in class in order to be sure to have fully grasped the explained concepts before the next lesson. And, needless to say it, do the exercise without copying them from your colleagues.

For the exam the main difference with respect to other courses is that you have to train much more than studying. The content of this course is easy and does not need extensive study, however it is only with practice that you become skilled enough and know immediately what to do without wasting time.

Exam

Exam is split in three parts.

1. Theoretical questions on cryptocurrencies, blockchain technology and IOTA.
2. Practical exercises on Python and financial applications
3. Practical exercises on smart contracts on ethereum blockchain

Coursework

Attending students have the opportunity to skip part 2 of the exam and replace it with a constant coursework. The coursework consists in
(a) home exercises which will be assigned after each lesson and which must be returned to dr. Coletti via email not later than 24 hours before the next lesson (0 hours before the next lesson in case it is the day after);
(b) oral presentation of exercises and similar tasks at the beginning of each lesson. Attendance is mandatory to all Python lessons except one, as you must be available for being called. In case of problems, you can be available via Skype, but set up everything in advance as all the technical problems are your responsability;
(c) practical mid-terms which will be organized periodically during the course. In case you skip one, we can try to arrange to do it later, but I do not guarantee.
In order for the coursework to be considered sufficient, you must have fulfilled all three points and with a weighted average grade of at least 60%. If the grade you receive is sufficient but too low for you, please write an email to dr. Coletti at least 7 days before the exam telling him that you will do the full exam.
Note that the only required attendance is when you might be called for the oral presentations or at the mid-terms, for the rest of the lesson you stay only if you think it may be useful for you, there are videos covering all my lessons.

Study resources

Topic
Lessons' slides
Videos as replacement of attendance
Written material as support
Precourse No slides anymore in 2019 Go down here

No books in 2019!

Python No slides anymore in 2019 Go down here Overview of lessons topics
financial applications with Python No slides anymore in 2019 Go down here No books in 2019!
Cryptocurrences Slides Go down here No books in 2019!
IOTA to appear... Watch the unibz videorecording No books in 2019!
Smart contracts No slides anymore in 2019 to appear No books in 2019!

 

Files and programs used in class Last updated
Files for video 12  
All the files in a single package  

Videos of lessons

course advertisement
YouTube Old course advertisement
course brief presentation
YouTube Brief course presentation
precourse 01
YouTube Precourse for Windows 10 on unibz network and file handling, first part.
precourse 02
YouTube Precourse for Windows 10 on unibz network and file handling, second part.
precourse Mac 01
YouTube Precourse for Mac on unibz network and file handling, first part.
precourse Mac 02
YouTube Precourse for Mac on unibz network and file handling, second part.
01 installing Anaconda
YouTube For Python we will use Anaconda with Jupyter and Python 2.7 (but 3.7 is fine)
01bis refusing to install Anaconda
YouTube For those who do not have a notebook (and borrow one from the library) or refuse to install Anaconda
02 variables
YouTube  
03 operators
YouTube  
04 conditionals
YouTube  
05 functions
YouTube  
06 lists
YouTube  
07 tuples and dictionaries
YouTube  
08 loops
YouTube  
09 counting and summing
YouTube  
09 bis extra exercises on counting and summing
YouTube  
10 modules and packages
YouTube  
11 arrays and random
YouTube  
12 importing data
YouTube Do not forget to download the data for this video.
13 rate of return
YouTube  
14 portfolios
YouTube  
15 risk
YouTube  
16 ....
YouTube  
17 ....
YouTube  
Cryptocurrencies and blockchain technology
YouTube A decentralised currency, basic cryptography, Bitcoin history and technology, blockchain technology, advantages and criticisms
Lesson of Antonio Nardella
YouTube to come...
01 .... smart contracts....
YouTube to come...
02 ....
YouTube  
YouTube

This short video illustrates how to reach unibz network folder \\ubz01fst (which contains course_coletti and your own personal stuff) using VPN when you are connected from outside university or when you are connected using wifi.
This procedure is not part of exam's stuff.

Exam

Before the exam:

  1. if you use your own computer, make sure that it works perfectly and everything is installed;
  2. check that you are able to locate \\ubz01fst.unibz.it\Courses directory. You will not be helped during the exam on this topic;
  3. if you are using unibz computer and even if you are using your own computer, make sure that you are able to us the computers in classroom A518 and that your unibz account is properly configured and working correctly, in particolar that you are able to save correctly files on your Desktop. Coming to one of my office hours before the exam can be helpful if you are not sure of this;
  4. do not come to the practical test without having ever logged on your account to check everything;
  5. check carefully that all the programs you need work on the unibz computer in case you are using them.

Frequently Asked Questions

These FAQ will be updated!

Q: Which software do I need for Python on my notebook?
A:
Anaconda is available for Windows and for Mac. Take care to install Python 2. Watch the video 01 for details.

Q: Which software do I need for smart contracts on my notebook?
A:
I am sorry, I am still preparing the course. I will tell you as soon as I do some tests.

Q: I have no notebook. What do I need for the course and for the exam?
A:
You can borrow a notebook from the library. Watch the video 01bis to know how can you use Jupyter, you have several possibilities. For smart contracts I will arrange as soon as I decide what exactly to do.

Q: How can I reach network folder \\ubz01fst from outside unibz or connected via wifi?
A: For Windows users: if you are connected to wifi ScientificNetwork try to digit in any explorer address bar \\ubz01fst.unibz.it and see whether you reach it. You need to provide your login and password, but you need to tell to your computer that you are using a different domain and then you have to type unibz\loginname instead of simply loginname. If this fails or if you are no connected to ScientificNetwork, then you need to install VPN. There is a specific video up here.
For Mac users: if you are connected to wifi ScientificNetwork, Finder -> Go -> Connect to server -> smb://ubz01fst.unibz.it . You need to provide your login and password, but you need to tell to your computer that you are using a different domain and then you have to type unibz\loginname instead of simply loginname.

Q: May I fix an appointment to talk with you?
A: I do not fix personal appointments. I have office hours explicitely dedicated to this task, which I try to scatter evenly during the semester with a higher frequency before exams. In any case all the office hours are open to everybody, so you may come also to office hours of my other courses, see list on www.paolocoletti.it/timetable. As I live in the XXi century, I prefer questions asked via email so that I have time to reflect and explain slowly, with a video if it is necessary. Please state clearly which course are you talking about, as I have several. You will wonder how quick I am in answering!

Q: When will the next exam be? Can you give me a hint on the exam's date because I have to catch a plane? Can you move the exam's date? Can you fix the exam's date on the week I suggest?
A: Please stop writing me emails on this topic. Exam's date appears on your timetable as soon as it is official. If you have something to say about it, contact your students' speaker who is the only one who can submit requests on students' behalf.

Q: I may not enrol online for technical or administrative reasons or I forgot to enrol or it is my third attempt and I cannot enrol. Can I do the exam anyway?
A: No, I may not let non-enrolled students take part of the exam. Do not ask me to do illegal things! Ask the secretary whether there is something they can do.

Q: May I do the exam with my computer?
A: Sure. But beware: (1) you must be able to navigate the Internet and to enter directory \\ubz01fst.unibz.it\Courses\Course_Coletti. Do not wait for the day before the exam to check it. (2) You are responsible for your different programs' versions and configurations and for the absence on your computer of specific programs.
In any case you will have a unibz desktop computer in front of you.

Q: May I use the operating system in a different language?
A: Yes, sure. Your business.

Q: Will the exam be similar to the other exams on this website?
A: Sure. For the first year (2018/19) I shall put a couple of exam's prototypes.

Q: I lost a file during the practical exam because I did not save it correctly. What may you do?
A: Absolutely nothing. With time spent on exercises you should know the unreliability level of your programs, and how often you have to save.

Q: My files were not copied correctly at the end of the practical exam. What may I do?
A: Checking that the copy is correct, and practicing file copy even during the exam, is your task and is official prerequisite for this course.

Q: Hey, exam's time is not enough! I could not even finish it. If I only had other 5 minutes I would have done it much better!
A: Sorry but you are wrong, as I calculate more than twice the needed time. Look at the important warning after exam's explanation: the fact that for you exam's time was not enough is instead an indication that you must do many more exercises to be efficient and fast enough. On the other hand, if you have documented medical problems that slow your operations, write an email to me to have more time.

Previous exams

Session
Notes
Exam link
Solution link
Video solution
Video solution
02 prototype for A.Y. 2018/19
to come...

 

01 prototype for A.Y. 2018/19
to come...

 

This page is maintained by Paolo Coletti.

Marisa Crucitti il teatro per ringiovanire Paolo Coletti personal page La stanza dell'arte Paolo Coletti Paolo Associazione culturale e ricreativa Kender Trento Bolzano La stanza dell'arte Marzia Centro Felix Trento Aarghen Thael Il Vecchio Continente GURPS Marisa Crucitti il teatro per ringiovanire Laboratorio d'arte Gabbana cornici Rovereto Nursing Up sindacato infermieri Bolzano ASL Italia Advanced Squad Leader Club scherma Bolzano Bozen Fecht club spada fioretto sciabola