Showing posts with label keys. Show all posts
Showing posts with label keys. Show all posts

Monday, 12 October 2020

What is Data Programing?

UK assignment helper


BDAT 1004 – Data Programming

Problem Set 1 

This problem set is based on lectures 1,2 and 3. For a complete list of topics please consult page 2 of the course syllabus. Please consult the “Instructions for Problem Set Submissions” document under course information before submitting your assignment.

Question 1 
What data type is each of the following?


5

5.0

5 > 1

'5'

5 * 2

'5' * 2

'5' + '2'

5 / 2

5 // 2

[5, 2, 1]

5 in [1, 4, 6]

math.pi

 

Question 2 Write (and evaluate) Python expressions that answer these questions: a. How many letters are there in 'Supercalifragilisticexpialidocious'? b. Does 'Supercalifragilisticexpialidocious' contain 'ice' as a substring?

c. Which of the following words is the longest: Supercalifragilisticexpialidocious, Honorificabilitudinitatibus, or Bababadalgharaghtakamminarronnkonn? 

d. Which composer comes first in the dictionary: 'Berlioz', 'Borodin', 'Brian', 'Bartok', 'Bellini', 'Buxtehude', 'Bernstein'. Which one comes last? 


Question 3 
a. Write a function inside(x,y,x1,y1,x2,y2) that returns True or False depending on whether the point (x,y) lies in the rectangle with lower left corner (x1,y1) and upper right corner (x2,y2).

>>> inside(1,1,0,0,2,3)
 True 
>>> inside(-1,-1,0,0,2,3) False 

b. Use function inside() from part a. to write an expression that tests whether the point (1,1) lies in both of the following rectangles: one with lower left corner (0.3, 0.5) and upper right corner (1.1, 0.7) and the other with lower left corner (0.5, 0.2) and upper right corner (1.1, 2).

Question 4 
16. You can turn a word into pig-Latin using the following two rules (simplified): • If the word starts with a consonant, move that letter to the end and append 'ay'. For example, 'happy' becomes 'appyhay' and 'pencil' becomes 'encilpay'. • If the word starts with a vowel, simply append 'way' to the end of the word. For example, 'enter' becomes 'enterway' and 'other' becomes 'otherway' . For our purposes, there are 5 vowels: a, e, i, o, u (so we count y as a consonant). Write a function pig() that takes a word (i.e., a string) as input and returns its pigLatin form. Your function should still work if the input word contains upper case characters. Your output should always be lower case however.  

>>> pig('happy') 'appyhay

>>> pig('Enter') 
'enterway' 

Question 5 File bloodtype1.txt records blood-types of patients (A, B, AB, O or OO) at a clinic. Write a function bldcount() that reads the file with name name and reports (i.e., prints) how many patients there are in each bloodtype.

>>> bldcount('bloodtype.txt') 
There are 10 patients of blood type A.
 There is one patient of blood type B. 
There are 10 patients of blood type AB. 
There are 12 patients of blood type O. 
There are no patients of blood type OO.  

Question 6 
Write a function curconv() that takes as input: 

1. a currency represented using a string (e.g., 'JPY' for the Japanese Yen or 'EUR' for the Euro) 
2. an amount

and then converts and returns the amount in US dollars.

>>> curconv('EUR', 100)

122.96544 

>>> curconv('JPY', 100) 

1.241401

The currency rates you will need are stored in file currencies.txt:

AUD 1.0345157 Australian Dollar 
CHF 1.0237414 Swiss Franc 
CNY 0.1550176 Chinese Yuan 
DKK 0.1651442 Danish Krone 
EUR 1.2296544 Euro 
GBP 1.5550989 British Pound 
HKD 0.1270207 Hong Kong Dollar 
INR 0.0177643 Indian Rupee 
JPY 0.01241401 Japanese Yen 
MXN 0.0751848 Mexican Peso 
MYR 0.3145411 Malaysian Ringgit 
NOK 0.1677063 Norwegian Krone 
NZD 0.8003591 New Zealand Dollar 
PHP 0.0233234 Philippine Peso 
SEK 0.148269 Swedish Krona 
SGD 0.788871 Singapore Dollar 
THB 0.0313789 Thai Baht  


Question 7 Each of the following will cause an exception (an error). Identify what type of exception each will cause.


Trying to add incompatible variables, as in

adding 6 + ‘a’

 

Referring to the 12th item of a list that has only 10

items

 

Using a value that is out of range for a function’s

 input, such as calling math.sqrt(-1.0)

 

Using an undeclared variable, such as print(x) when x

 has not been defined

 


 
Trying to open a file that does not exist, such as 
mistyping the file name or looking in the 
wrong directory.  

Question 8 Encryption is the process of hiding the meaning of a text by substituting letters in the message with other letters, according to some system. If the process is successful, no one but the intended recipient can understand the encrypted message. Cryptanalysis refers to attempts to undo the encryption, even if some details of the encryption are unknown (for example, if an encrypted message has been intercepted). The first step of cryptanalysis is often to build up a table of letter frequencies in the encrypted text. Assume that the string letters is already defined as 'abcdefghijklmnopqrstuvwxyz'. Write a function called frequencies() that takes a string as its only parameter, and returns a list of integers, showing the number of times each character appears in the text. Your function may ignore any characters that are not in letters.


>>> frequencies('The quick red fox got bored and went home.') [1, 1, 1, 3, 5, 1, 1, 2, 1, 0, 1, 0, 1, 2, 4, 0, 1, 2, 0, 2, 1, 0, 1, 1, 0, 0] >>> frequencies('apple')


Question 9 The Sieve of Erastophenes is an algorithm -- known to ancient Greeks -- that finds all prime numbers up to a given number n. It does this by first creating a list L from 2 to n and an (initially empty) list primeL. The algorithm then takes the first number in list L (2) and appends it to list primeL, and then removes 2 and all its multiples (4,6,8,10,12, ...) from L. The algorithm then takes the new first number in L (3) and appends it to list primeL, and then removes from L 3 and all its remaining multiples (9,15,21,...). So, in every iteration, the first number of list L is appended to list primeL and then it and its multiples are removed from list L. The iterations stop when list L becomes empty. Write a function sieve() that takes as input a positive integer n, implements the above algorithm, and returns a list of all prime numbers up to n.


>>> sieve(56) 
[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53] 
>>> sieve(368) 
[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367] >>> sieve(32) 
[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31] 

Question 10 Implement function triangleArea(a,b,c) that takes as input the lengths of the 3 sides of a triangle and returns the area of the triangle. By Heron's formula, the area of a triangle with side lengths a, b, and c is s(s - a)(s -b)(s -c) , where s = (a+b+c)/2.

>>> triangleArea(2,2,2) 1.7320508075688772

 
 

Wednesday, 7 October 2020

Engineering Blockchain Applications

UK assignment helper

 




Course Syllabus - Spring A 2019 Engineering Blockchain Applications (CSE 598)



Course Description Blockchain technology is revolutionizing digitalization prospects for many industries and emerging as an exciting and rapidly growing field. By detailing the architecture of the technology, this course ensures that learners will be well versed in blockchain fundamentals. At the same time, it is designed to put learners on the leading edge by presenting the abstract nature of blockchain technology and emphasizing its broad applicability. Topics include the mathematical and cryptographic underpinnings of the technology, as well as mining, consensus protocols, networking, and decentralized governance.  

Learning Outcomes By completing this course you will be able to:

• Apply the Elliptic Curve Digital Signature Algorithm to identity management and computer security

• Determine the validity of chains given general consensus rules 

• Determine whether changes in consensus rules for a Nakamoto network will result in a successful protocol fork 

• Compare proof-of-work secured blockchains’ security to alternate security methods 

• Evaluate an optimal mix of network design and operational parameters to ensure network scalability and throughput 

• Evaluate the trade-off between security and computational complexity • Use Hyperledger Fabric to build a custom network configuration 

• Use Hyperledger Composer to build a business application 

• Create your own decentralized blockchain network 

• Change/add logic to a code base of a dash blockchain (forked from bitcoin)

Estimated Workload/Time Commitment 

Average of 15-20 hours per week

Required Prior Knowledge and Skills 

● Algebra 

● Programming in Python and C++

Recommended Prior Knowledge and Skills 

● Programming in node.js, Docker, Unix

Technology Requirements

Hardware

Standard with recent major OS 

NOTE: Linux recommended. 

Software and Other 

Standard

Textbook 

There is no required textbook for this course; however, the course creators recommend the following text:

Bitcoin and Cryptocurrency TechnologiesA Comprehensive Introduction, Arvind Narayanan, Joseph Bonneau, Edward Felten, Andrew Miller & Steven Goldfeder (2016)

Required course readings are provided within or accessible through the course. You will find them in the week each one is assigned.

Course Content

Instruction                                       Assessments

 

Video lectures                                 Practice quizzes and assignments

Other video or media                      (autograded)

Readings                                          Graded assignments (instructor graded)

Virtual office hours                         Individual projects (instructor-graded)

Live events                                      Final exam (proctored, auto-graded


Details of the main instructional and assessment elements this course comprises follow: 

Lecture videos. In each module the concepts you need to know will be presented through a collection of short video lectures. You may stream these videos for playback within the browser by clicking on their titles or download the videos. You may also download the slides that are used in the videos. The lecture slides for each module are provided in a reading preceding the introduction to the first lesson in each module. (NOTE: The exception is Module 1, where the slides are in the introduction to the second lesson.) 

Graded Quizzes. Each unit includes one graded quiz (“Unit Quiz”). There is no time limit on how long you take to complete each attempt at the quiz. Each attempt may

present a different selection of questions to you. Your highest score will be used when calculating your final grade in the class. Graded Discussion. Select units include one or more graded discussion prompts. You will find these assignments among units’ other content. Each prompt provides a space for you to respond. After responding, you can see and comment on your peers' responses. All prompts and responses are also accessible from the general discussion forum and the module discussion forum. Readings. Modules may include suggested readings or other recommended resources. They are supplementary materials selected to help you better understand or further explore the course topics. Proctored Exams: You will have one (1) proctored exam, a final. ProctorU is an online proctoring service that allows students to take exams online while ensuring the integrity of the exam for the institution. Additional information and instructions are provided in Week 1 of the course (also the MCS Onboarding Course). Course projects: This course includes two major projects, and both are to be completed individually (i.e., they are not team projects).


Course Grade Breakdown

Course Work

Quantity

Format

Percentage of Grade

Graded discussion 8 Individual 5%

8

Individual

5%

Other graded assignments 8 Individual 20%

8

Individual

20%

Graded quizzes

8

Individual

10%

Project submissions

2

Individual

30% (15x2)

Project reports

2

Individual

10% (5x2)

Final exam

1

Individual

25%




NOTICE: The projects for this course are eligible, together, for inclusion in your MCS Portfolio. You may submit your portfolio report for consideration by the course instructor within the course at its conclusion. 

 Grade Scale 

NOTE: You must earn a cumulative grade of 70% to earn a “C” in this course. Grades in this course will not include pluses or minuses.

A-

>=97%

A +

>=93% and <97%

A

>=90% and <93%

B

>=83% and

B -

>=83% and <87%

B

>=80% and

C+

>=77% and <80%

C

>=73% and

C -

>=70% and <73%

D

>=60% and <70%

E

<60%

 

Key Course Dates

Class begins: January 7, 2019 

Holiday: January 21, 2019: Martin Luther King Jr. Day (university closed) 

Project 1: February 1, 2019 

Project 2: February 22, 2019

Final exam and class ends: February 26, 2019 

Grades due: March 3, 2019  

Important Notice: Unless otherwise noted, all graded work is due at 11:59 p.m. on the Friday of the week for which it is assigned. Late penalties will be applied for work received or completed after the scheduled due date and time:

Graded assignments: One-time 20% penalty 

Graded quizzes: One-time 15% penalty

Live Events - Weekly (meet with the course instructor and your classmates to learn more about course topics and discuss assignments): 

Tuesday from 10:00-1100 a.m. Arizona time (check the Live Events page in the course for your local time and access details)

Note: These events will be recorded and uploaded to the course.

ATTENTION: The live event for the week of 1/21/19 will be held on Wednesday (not Tuesday) from 10:00-11:00 a.m. Arizona time. The Zoom link is unchanged.

Virtual Office Hours - Weekly (another chance to get your questions answered from the course instructor): 

Wednesday from 1:00-200 p.m. Arizona time (check the Live Events page in the course for your local time and access details)

1: Getting Started and the Blockchain’s Abstractions and Applications

January 7, 2019

January 13, 2019

2: Hash Functions

January 14, 2019

January 20, 2019

3: Cryptographic and Mathematical Foundations of the Blockchain

January 21, 2019

January 27, 2019

4: Transactions on the Blockchain

January 28, 2019

February 3, 2019

5: Mining

February 4, 2019

February 10, 2019

6: Blockchain Consensus

February 11, 2019

February 17, 2019

7: Peer-to-Peer Networks

February 18, 2019

February 24, 2019

8: Governance and Course Wrap-Up

February 25, 2019

February 26, 2019

 Course Outline

Week/Unit 1: The Blockchain’s Abstractions and Applications 

Module 1: Introduction to Blockchain Technology Module 

2: Benefits of Blockchain Technology Module 

3: Blockchain Applications Module 

4: The Blockchain Ecosystem


Week/Unit 2: Hash Functions

Module 1: Introduction to Hash Functions

Module 2: Hash Functions for Password Handling Module

3: Application-Appropriate Hash Function Module

 4: Merkle Trees and Merkle Proofs

Week/Unit 3: Cryptographic and Mathematical Foundations of the Blockchain 

Module 1: Elliptical Curves Digital Signatures 

Module 2: Private Key Handling 

Module 3: Other Mathematical Concepts

Week/Unit 4: Transactions on the Blockchain 

Module 1: Introduction to Transactions 

Module 2: Scripts 

Module 3: State Channels 

Module 4: Wallets

Week/Unit 5: Mining 

Module 1: Introduction to Mining 

Module 2: Mining and Network Attacks 

Module 3: Mining Pools Module 4: Mining Considerations

Week/Unit 6: Blockchain Consensus 

Module 1: Introduction to Blockchain Consensus 

Module 2: Consensus Algorithms

Week/Unit 7: Peer-to-Peer Networks 

Module 1: Introduction to Computer Network Architecture 

Module 2: Nodes 

Module 3: Block Propagation Module 4: SPV Clients

Week/Unit 8: Governance 

Module 1: Decision-Making on Decentralized Networks 

Module 2: Hard and Soft Forks 

Module 3: Network Signaling 

Module 4: Two-Tiered Network Governance

Policies All ASU and Coursera policies will be enforced during this course. For policy details, please consult the MCS Graduate Handbook 2018 -- 2019 and/or the MCS Onboarding Course.

Course Creators

The following faculty members created this course.


Dragan Boscovic



Dragan Boscovic is a research professor in the School of Computing, Informatics, & Decision Systems Engineering (CIDSE), as well as Technical Director of CIDSE’s Center for Assured and Scalable Data Engineering and Distinguished Visiting Scholar, mediaX, at Stanford University. Dr. Boscovic also leads ASU’s Blockchain Research Lab, where his team’s mission is to advance the research and development of blockchain-based technologies for use in business, finance, economics, mathematics, computer science, and all other areas of potential impact.

He holds a Ph.D. in EE and CS, Numerical Electromagnetic Modeling from University of Bath, United Kingdom (1991) and a Magistar in EE, eq. Ph.D., Microwave and Optoelectronics from University of Belgrade, Serbia (1988). He has 25 years of high tech experience acquired in an international set up (i.e. UK, France, China, USA) and is uniquely positioned to help data-driven technical advances within today’s global data-intensive technology arena. He is a lateral thinker with broad exposure to a wide range of scientific methods and business practices and has a proven track record in conceiving strategies and managing development, investment and innovation efforts as related to advanced data analysis services, user experience, and mobile and IoT solutions and platforms. 

Darren Tapp



Darren Tapp was involved in the development of Bitcoin and is now a researcher on the digital cash (cryptocurrency) development team at dash.org, a non-profit blockchain technology startup. He earned his doctorate in mathematics from Purdue University in 2007 and holds both a bachelor’s degree in physics and mathematics and a master’s degree in mathematics from the University of Kentucky. Most recently he has taught both on-ground and online at schools including Southern New Hampshire University, NHTI - Concord's Community College, and Hesser College. He lives in New Hampshire, where he volunteers promoting STEM subjects to high-school-aged members of the Big Fish Learning Community.


Acknowledgements 

The faculty wish to thank the following students and blockchain community members for their contributions to this course: 

Jeremy Liu 

Nakul Chawla 

Raj Sadaye

About ASU

Established in Tempe in 1885, Arizona State University (ASU) has developed a new model for the American Research University, creating an institution that is committed to access, excellence and impact.

As the prototype for a New American University, ASU pursues research that contributes to the public good, and ASU assumes major responsibility for the economic, social and cultural vitality of the communities that surround it. Recognizing the university’s groundbreaking initiatives, partnerships, programs and research, U.S. News and World Report has named ASU as the most innovative university all three years it has had the category.

The innovation ranking is due at least in part to a more than 80 percent improvement in ASU’s graduation rate in the past 15 years, the fact that ASU is the fastest-growing research university in the country and the emphasis on inclusion and student success that has led to more than 50 percent of the school’s in-state freshman coming from minority backgrounds.

About Ira A. Fulton Schools of Engineering

Structured around grand challenges and improving the quality of life on a global scale, the Ira A. Fulton Schools of Engineering at Arizona State University integrates traditionally separate disciplines and supports collaborative research in the multidisciplinary areas of biological and health systems; sustainable engineering and the built environment; matter, transport and energy; and computing and decision systems. As the largest engineering program in the United States, students can pursue their educational and career goals through 25 undergraduate degrees or 39 graduate programs and rich experiential education offerings. The Fulton Schools are dedicated to engineering programs that combine a strong core foundation with top faculty and a reputation for graduating students who are aggressively recruited by top companies or become superior candidates for graduate studies in medicine, law, engineering and science.

About the School of Computing, Informatics, & Decision Systems Engineering 

The School of Computing, Informatics, and Decision Systems Engineering advances developments and innovation in artificial intelligence, big data, cybersecurity and digital forensics, and software engineering. Our faculty are winning prestigious honors in professional societies, resulting in leadership of renowned research centers in homeland security operational efficiency, data engineering, and cybersecurity and digital forensics. The school’s rapid growth of student enrollment isn’t limited to the number of students at ASU’s Tempe and Polytechnic campuses as it continues to lead in online education. In addition to the Online Master of Computer Science, the school also offers an Online Bachelor of Science in Software Engineering, and the first four-year, completely online Bachelor of Science in Engineering program in engineering management.

 




 











Tuesday, 6 October 2020

What is Database system ?

UK assignment helper

MITS4003 

Database Systems 


Assignment 1 


August 2020 


Objectives(s) 

This assessment item relates to the unit learning outcomes as in the unit descriptor. This assessment is designed to improve students’ skills to analyze organization database requirements, develop a data model to reflect the organization’s business rules and use data manipulation language to manage database. This assessment covers the following LOs. 

1. Synthesize user requirements/inputs and analyse the matching data processing needs, demonstrating adaptability to changing circumstances;

 2. Develop an enterprise data model that reflects the organization's fundamental business rules; refine the conceptual data model, including all entities, relationships, attributes, and business rules. 

3. Derive a physical design from the logical design taking into account application, hardware, operating system, and data communications networks requirements; 

Case Study: 

Prestige Automobile Rental (PAR) is a vehicle rental company that rents old vehicles to the public. PAR has been using manual methods for keeping track of their customers and their rentals. However, the company would now like to go online and allow customers to search the available vehicles and see their rental history. 

For the first time, when the customer rents a vehicle from PAR their details (name, address, phone number, driving license number and credit card number) are recorded. The date they become a customer is also stored. There are certain types of vehicles which are classified as heavy vehicles. It is a policy of PAR that these vehicles are only rented to customers who have no demerit points on their driving license. 

The information about the vehicle (type, registration number, year/make/model, vin number, distance travelled and current condition) are also stored. Each vehicle has a unique ID. The customer can search for their desired vehicle and can see if it is available. 

 All rentals are for 7 days. Rental charges are based on the type of vehicle (Car (C) or Heavy Duty (HD)). Rental must be paid for on collection. Customers can rent up to 2 vehicles at a time. Each rentalID is for a single vehicle for one customer. (The rentalID is an auto number). When the rental is taken out the date of checkout is recorded along with calculated due date (7 days from checkout date). When the rental is returned, the date is recorded in the returned date.

 PAR would like to store ‘demerit’ points for the renter in order to identify bad renters. These demerit points are accumulated at a rate of one point per day a rental is overdue. PAR will cancel the membership of the customers who have too many demerit points. 

Assignment Requirements and Deliverables: 

Part A - 10% (Due in week 5) 

Submitted as a MS Word Document 

• Develop an Entity Relationship Diagram 

• Relational Schema (including Primary, Foreign Keys and all attributes). 

• Supplementary Design requirements (data attribute information)

 • Discuss physical design and any assumptions made during design 



Marking Guide: 

Marking Guide:

Marking Guide: Unacceptable

Acceptable

Good

Excellent

Entities, Primary Keys, Relationship

Does not adequately have all required Entities, Primary Keys and Relationship in ER diagram

Partially have all required Entities, Primary Keys, and Relationship in ER diagram

Most of the required Entities, Primary Keys and Relationship are there in ER diagram

All Entities, Primary Keys and Relationship are there in ER diagram

Relational Schema

Does not adequately have required tables, Primary Keys and Foreign keys

Partial have required tables, Primary Keys and Foreign keys.

Most of the required tables, Primary Keys and Foreign keys are there.

All tables, Primary Keys and Foreign keys are there.

Supplementary Design Requirements

Does not adequately have required attributes.

Partially have required attributes.

Mentioned most of the required attributes.

All required attributes are there.

Discussed physical design

Adequately discussed about relationship in physical design.

Partially discussed about relationship in physical design.

Covered most of the relationship in discussion.

Covered all relationship in discussion.