Search Results
Search this site
1009 results found with an empty search
- Programming Languages to Making Innovative Android App
Take a minute to think about how many times you use an app in a day? Multiple times, isn’t it? In fact, there is probably an application waiting to be discovered in your app store for every possible human need. Therefore, it is no surprise that the demand for mobile applications has been on a steady rise ever since the smartphone was invented. Kotlin Said to be the advanced version of Java – Kotlin is a statistically typed programming language used for developing modern Android applications. Kotlin is a really best language for apps. Kotlin has the potential to influence other programming languages such as JAVA to make high-performing and robust apps. Some popular apps built-in Kotlin are Trello, Evernote, Coursera, and many more. Clean, concise, and perceptive syntax increases team efficiency. Interoperable and versatile and can easily overrule the shortcomings of JAVA. Has full support from Google and IDE’s installation packages including Android and SDK toolkit. Generates compact, simple, and cleaner code as compared to JAVA. Java : Java is an official Android development – object-oriented programming language. With in-built open-source libraries readily available for users to choose from, JAVA is easy to handle and offers the best documentation and community support. With JAVA’s vibrant spectrum of features, you can develop the best cross-platform apps, Android apps, games, server apps, embedded space, websites, and more. Popular for code reusability and portability JAVA codes can run in multiple environments, virtual machines, browsers, and different platforms Safeguards developers against issues inherent in native code, memory leaks, etc. Flexible, versatile, portable, and platform-independent programming language Explicit interface, simplified, and machine-independent language Hire an android developer to get quick help for all your android app development needs. with the hands-on android assignment help and android project help by Codersarts android expert. You can contact the android programming help expert any time; we will help you overcome all the issues and find the right solution. Want to get help right now? Or Want to know price quote
- Inventory Management System Using JavaFX
Guidelines – Please read carefully: I. This assignment/module is used to assess your object-oriented design and programming skills. Hence, any use of databases and query languages (e.g. SQL) is strictly prohibited and would result in a fail grade. Brief: Design, implement and test an inventory management system for a real estate agent in Northampton using object-oriented principles in Java FX. The design should include class diagrams. Testing should include both the white box (JUnit tests) and the black box (test logs). Consider the following requirements: The agent sells/rents houses (detached, semi-detached, terraced), flats, and bungalows in different areas of Northampton such as Abington, Far Cotton, Duston, Wootton, and so on. Each accommodation has a minimum of 1 bedroom and a maximum of 5 bedrooms. Here are the specific requirements: Basic System Requirements: The system must allow the agent to: 1. Record details of a new customer (name, phone number, current address, etc.) 2. Display houses for sale (details of each house – detached, bedrooms, bathrooms, garden, etc.) 3. Sell houses to customers (i.e. record details of sales transaction) 4. Generate a sales invoice including details of agent fees of 1.5%. 5. Record payment for each customer. 6. Permanent storage and retrieval of all records (object serialization or text/CSV files). Enhancements (in order of importance – high to low): Additional features that you may include are as follows: 7. Search for a house by property type (e.g. detached house, flat, bungalow), area, price range, number of bedrooms, bathrooms, status (sold/unsold/on offer). 8. Display houses for rent (including rental price) and generate several invoices (initial invoice including deposit, agent fees, and one month’s rent; monthly rental invoices; final invoice at the end of contract including any deduction for damage). Assume the deposit to be three times the monthly rent and agent fees to be £300.00. 9. Ability to automatically generate and send emails containing monthly rental invoices (as attachments) to all customers. 8. Input/update inventory information (i.e. add/modify stock, prices) 10. Send an email containing the invoice as an attachment (pdf file) to the customer 11. Record a customer waiting list when accommodation is unavailable and notify them when it becomes available 12. Role based access (e.g. separate accounts for sales person, stock manager and administrator) 13. Login feature for the system These additional features are only suggestions and are not exhaustive. You may include any other useful features relevant to this application. You may make assumptions regarding any other specifications not detailed in this brief. Deliverables: All requirements (A, B and C below) MUST be delivered to achieve a passing grade for this assignment. A) Technical Report The report should consist of the following sections (in the same order): 1. Username and password for all relevant accounts (if implemented) 2. UML Class Diagrams showing relationships between the main classes in the model 3. A list of all the features implemented in a tabular format. For example: 4. Explanation of the main sections/fragments of the code. Provide information that would be useful for another developer (not an end user!) who may want to extend/maintain your system. You may want to refer to the class diagrams to explain code. 5. Screenshots of the system showing all key features 6. Evidence of Testing: a. Blackbox Testing: Test logs providing information of all the tests carried out (including any failed tests for functionality not implemented) b. Whitebox Testing: Code Listing of the JUnit test case for at least two methods. c. List of any bugs and/or weaknesses in your system (if you do not think there are any, then say so). Bugs that are declared in this list will lose you fewer marks than ones that you do not declare. 6. References If you have borrowed some code from elsewhere (e.g. from a book or some resource on the web you must indicate clearly what they are and include references). B) Source Code The source code must be well documented with necessary comments. Consistent and clear indentation of the code is also important. Source code needs to be submitted in two forms: (i) As a single ZIP archive (.zip file consisting of all “.java” files, unit tests, data files, executable jar). Note: It is important to submit an executable jar. You will be penalized for not submitting it. (ii) A commented full listing in a separate Word document named “Full Source Code Listing”. C) Video Demonstration In addition to the report, you must submit a video demo (URL) of your assignment. The demo should be about 10 minutes long (maximum:15 minutes) and should cover all of your work in a logical way. You should explain the main phases of design and implementation covering the main fragments of code. Your voice needs to be clear for the marker to hear. It should also include a walkthrough of using the software and must demonstrate the key features. The module tutor reserves the right to invite you for an online viva-voce. Poor demo/viva could negatively influence other sections in the marking criteria. Submission Procedure: TWO separate WORD documents. [Document 1 = Report & Document 2 = FullSourceCodeListing] Contact us for this JavaFx assignment Solutions by Codersarts Specialist who can help you mentor and guide for such JavaFX assignments.
- Food Menu App Using Rest
In This App User can see the list of food, Recipe link related to that food, image of food into the app, If user click any food into the list user is able see the recipe of that food, & into the top of the app user can see the search icon to search which he and likes. There is a navigation view into the navigation user can see logout button , list of recipe and setting button. Concepts Use Menu Navigation SearchView Models ArrayAdapter ListView Fragment Rest Api OnclickListener Tools and Technologies Android Studio As the official integrated development environment for all Android applications, Android Studio always seems to top the list of preferred tools for developers. Android Studio provides code editing, debugging, and testing tools all within an easy-to-use drag-and-drop interface. It is free to download and is supported not only by Google, but also by a large and actively engaged community of Android developers. ADB (Android Debug Bridge) Android Studio includes the Android Debug Bridge, which is a command-line tool or “bridge” of communication between Android devices and other computers that can be used during development and the overall debugging and QA process. By connecting an Android device to the development PC and entering a series of terminal commands, a developer is able to make modifications as needed to both devices. AVD Manager As we mentioned above, there was Eclipse before there was Android Studio. For a long time, Eclipse was the officially preferred IDE for all Android application development. Even though Google no longer offers support for Eclipse, many developers still use it to create Android and other cross-platform apps, as it works very well with many different programming languages. Java The mobile edition of Java is called Java ME. Java ME is based on Java SE and is supported by most smartphones and tablets. The Java Platform Micro Edition (Java ME) provides a flexible, secure environment for building and executing applications that are targeted at embedded and mobile devices.\ Hire an android developer to get quick help for all your android app development needs. with the hands-on android assignment help and android project help by Codersarts android expert. You can contact the android programming help expert any time; we will help you overcome all the issues and find the right solution. Want to get help right now? Or Want to know price quote GitHub : https://github.com/rishabh1422/music
- Introduction To Java and object-Oriented Programming
Introduction This is coursework assignment 1 (of two coursework assignments in total) for 2020–2021. The assignment asks that you demonstrate an understanding of variables, random numbers, user input with the Scanner class, the “if – else” statement, loops and static methods with their return types. In addition, this assignment considers how to write code that is readable. Electronic file you should have: StringMangler.java What you should hand in: very important You are asked to submit one Java file so there is no reason to compress your submission, or to submit it in a directory. There is one mark allocated for handing in an uncompressed file – that is, students who hand in a zipped or .tar file or any other form of compressed file can only score 99/100 marks. There is one mark allocated for handing in just the file asked for without putting it in a directory; hence, students who upload their file in a directory can only achieve 99/100 marks. There is one mark for naming the Java file that you have been asked to submit exactly as asked. This means that your Java file should be named StringManglerTwo.java and should contain a public class called StringManglerTwo. Please note that since Java is case sensitive Stringmanglertwo.java is not the same file name as StringManglerTwo.java; please be exact. Sometimes students add identifying information to their Java files, meaning that the class name and the file name differ, and the file will not compile. For example: JSmith_StringManglerTwo.java cwk1-StringManglerTwo.java JSmith-CO1109-assignment1-StringManglerTwo.java StringManglerTwo .java (note space before full stop) Files that do not compile because of a clash between the file name and the class name will be marked. Furthermore, submissions that do not compile for any other reason will not receive any marks. The examiners will compile and run your Java program; students who hand in files containing their Java class that cannot be compiled (e.g. PDFs) will not be given any marks for the assignment. The examiners wish to read your Java code, so class files will not be marked. Any student giving in only a class file will not receive any marks for the coursework assignment, so please be careful about what you upload as you could fail if you submit incorrectly. Please put your name and student number as a comment at the top of your Java file. Java Version Please use Java 11 or later versions of Java for this coursework assignment. The StringMangler class You have been given the StringMangler class. The class offers the user various options, all of which take a String as input and return the input String altered in some way. Compile and run the program. You should see a menu, as follows: Welcome to the String Mangler Available commands: VOWELCASE swap the cases of all vowels in ASCII show the ASCII character codes for every letter in SWAP swap the first and last characters of RANDOM swap a random character in with a randomly generated character INGIFY if a word in the ends with "ing", have it end with as many 'ing's as the word is long DEMATHS remove any potential mathematical symbols from DEDUPE remove all repeated letters in DIGRAPHS capitalise the most common digraphs in English that are found in MIDREPEAT repeat the middle of words in the 3 times if the word is of an even length, 5 times if it's of an odd length PAIRSWAP swap around every 2 letters in ZIP split in half and interleave the 2 halves together INSERT add # or ~ to after every 3 characters, depending on if the string length is even or odd REPEATSWAP swap the most common repeated letters in the English language (SS <-> FF & TT <-> EE) QUIT exit the String Mangler Enter command: The user can choose any item from the menu. For example, the user chooses DEMATHS, followed by SWAP: Enter command: demaths hello what is the square root of -1? Warning! Your text contained mathematics. Decontaminated text follows: hello what is the square root of ? Enter command: swap hello! !elloh Enter command: You should test each of the menu options and make sure you understand what they do. Reason for using Java 11 (or later versions) The StringMangler class uses String methods extensively. One of these methods, String.join() was introduced in Java 8, and another, String.repeat() in Java 11. If you use a version of Java that is earlier than 11, the repeat() method will give a compilation error, and if the version of Java you use is also earlier than 8, the join() method will give another compilation error. You can read the documentation on these methods in the Java 11 String API: https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html Class variables Note that variables have a scope, generally the set of brackets inside which they are declared. When a variable is in scope it means that it can be accessed and used. Variables are generally only in scope where they are declared. For example: for (int i = 0; i < word.length-1; i += 2) {i++;} the variable i is only in scope inside the for loop, as it is declared in the for loop. Once the loop ends i is out of scope and cannot be accessed. Variables can be local to methods, that is, variables declared inside a method are in scope only inside the method. Variables declared in a loop would be local to the loop. In general, if a block of code is delineated by brackets, then any variable declared immediately inside those brackets is only in scope within the brackets, and effectively does not exist outside of them. The StringMangler class has two class variables. Class variables are static variables that are declared inside the class, but outside of all the class's methods. Class variables can be accessed by methods within the class without needing to be included in the method’s parameter list since they are in scope anywhere in the class. The StringMangler class has two class variables, a Scanner object called userInput, and a variable of Random type called random. Writing your own methods You are asked to alter the structure of the StringMangler class by reorganising the class into methods in order to make the class both more readable and more reflective of the objectoriented programming paradigm (in the object-oriented programming paradigm, methods should have one task to do). Try to keep your methods short, since, in general, the shorter a method is, the easier it is to read. Note that a method may have an overarching task, which the method’s name should describe, but it may be that the task undertaken by some methods could be broken down into further sub-tasks, and some or all of these sub-tasks could be performed by methods. Suppose that the main task of a method was to take a String and return a new String with the case of all vowels in the String changed. For example, the input String “Vowels are A, E, I, O and U” would return “VOwEls ArE a, e, i, o And u”. The method’s task can be broken down into sub-tasks such as breaking the input String into characters, finding the vowels in those characters and changing their case. The developer may choose to outsource one or other of these tasks to another method. For example, the method may invoke another method that takes a char and will return the char unchanged if it is not a vowel, and in a different case if it is a vowel. Hence, the String method to change the case of all vowels in a String might be more readable if it invokes a char method called ChangeCaseOfCharIfVowel or ChangeCaseOfVowels or similar. When making decisions about whether the methods you write should in turn invoke other methods, please always bear readability in mind (see the Appendices for details). That is, invoking sub-methods can make your methods more readable, but too much of methods invoking methods will make your class less readable. What methods to write, and if and how to break methods into sub-tasks with their own methods, is a matter for your judgement. Changing logic or syntax To complete this coursework assignment, you will need to write some additional Java code to that already in the StringMangler class. You may wish to change some of the code given to you but remember the StringMangler class works as it is. Your challenge is not to change the behaviour of the class, but to redesign the class using methods. Mark deduction for recursive methods When putting code into methods, you may wish to keep the logic and syntax of the statements being put into a method. You are free to rewrite existing code, provided that your revised StringMangler class does everything that the original class did. If you do rewrite existing code that is in a loop, please do not use recursion for iteration (or for any other reason). Make sure that any loops are for, while or do/while loops. If you use recursion (where methods call themselves) for iteration you will lose marks, so please make sure that none of your methods are recursive. Note that in general, care must be taken when using recursion for iteration, as recursive methods can be very heavy on the memory, potentially leading to applications ending with a StackOverflowError. Recursion can be a good solution for certain problems, but care must always be taken to make sure that recursive methods are not using so much memory that they compromise overall performance Coursework assignment 1 Please complete the following five Tasks: Task 1 Note that the work of the StringMangler class is carried out entirely in the main method. Under the object-oriented programming paradigm, tasks performed in a class should be done by methods, and each method should perform only one task. Save the StringMangler class into a new class, called StringManglerTwo. In this class rewrite the StringMangler class such that all code is within a method, except for the statements: private static Scanner userInput; private static Random random; which are declaring class variables and should not be put into methods. Your StringManglerTwo class, when run by a user, should have exactly the same behaviour as the StringMangler class. You are not expected to write a constructor for the StringManglerTwo class, and instance methods are also not necessary. All of your new methods can be static methods Task 2 In your StringManglerTwo class, ensure the main method only contains method invocations. Task 3 The methods invoked by the main method of your StringManglerTwo class may vary, depending on how you have re-designed the StringMangler class, but one method all submissions should have is a method to run the user interaction loop. Your user interaction loop method should: ask the user for input parse the input into a command and a String take appropriate action. The method should repeat these steps until the user enters ‘quit’ and the run of the class ends. Hence your user interaction loop method should be the final method invoked by the main method. Your user interaction loop method should be doing its work with the help of other methods that it in turn, invokes. Task 4 Make sure to follow the advice given about readability in Appendix 1, sections 1.2–1.6. In particular: Give your methods, and any new variables you introduce, names that describe their purpose. Good names are partly subjective, so the examiners will accept any reasonable attempt, but clearly method names such as method1() and method2() will lose readability marks since they tell the reader nothing about the purpose and intent of the methods. Format your work in a way that is both consistent and readable. The StringMangler class that you have been given is formatted in a readable way, including indenting loops and if/else statements to show the control structure and make it easy to pick out the start and end of loops and if/else blocks. Any student submitting a StringMangler class with poorly formatted code will lose some marks for this Task Note that poorly formatted code is considered to be code that is formatted in such a way that the control structure is unclear. For example: //Good formatting private static String getShopLocationFromUser() { System.out.println("SHOP LOCATIONS:"); for (int i = 0; i < LOCATIONS.length; i++) { System.out.println((i+1) + ") " + LOCATIONS[i]); } int choice = getIntFromUser("Your shop’s number"); return LOCATIONS[choice-1]; } //Poor formatting private static String getShopLocationFromUser() { System.out.println("SHOP LOCATIONS:"); for (int i = 0; i < LOCATIONS.length; i++) { System.out.println((i+1) + ") " + LOCATIONS[i]); } int choice = getIntFromUser("The number that corresponds to your shop"); return LOCATIONS[choice-1]; } Task 5 Before you start work you should run the StringMangler class and make sure that you understand what it is doing. Once you have written your new version of StringMangler, test it. Correct any mistakes you find. If you find mistakes that you cannot correct then you must document them with a brief comment at the top of your class. If your testing reveals that the class works as you expect, please write a short comment to document this (a sentence will be enough). Make sure to test all the methods in your class. Failure to write a comment about testing will result in a loss of all marks for testing, even if your class works as it should. You should write no more than 100 words per issue found, for example if your testing discovers two issues, then you should write no more than 100 words to describe each issue, hence your total word count should be no more than 200. The examiners will run and test your submission. Provided that any issues with the class are documented in your comment, you will receive all available marks for this Task. You will lose all marks for this Task if the examiners find issues with the class that you have not documented with your comment, or if you do not write a comment about testing. Contact us for this Java assignment Solutions by Codersarts Specialist who can help you mentor and guide for such Java assignments.
- FashionMNIST - PyTorch | Sample Assignment | Assignment Help
Guidelines 1. You are allowed to work in pairs. 2. You are allowed to use numpy and scipy packages and PyTorch framework. 3. Technical questions about this exercise should be asked at the course’ piazza or during the TIRGUL. 4. Personal issues regarding the deadline should be directed to Yael Segal. 5. In order to submit your solution please submit the following files: (a) details.txt - A text file with your full name (in the first line) and ID (in the second line). (b) ex 4.py - A python 3.6+ file that contains your main function (attach ANY additional files needed for your code to run). (c) ex 4 report.pdf - A pdf file in which you describe your model and parameters. (d) test y - your model’s predictions on the given test set (see instructions below). Ex4 In this exercise you will implement, train and evaluate your neural network using PyTorch package. Installation First, you will need to install PyTorch package. Installation instructions were uploaded to the Piazza. Please follow them and discuss issues there. Data - FashionMNIST The same one from exercise 3. Each image is 28 pixels in height and 28 pixels in width, for a total of 784 pixels in total. Each pixel has a single pixel-value associated with it, indicating the lightness or darkness of that pixel. This pixel-value is an integer between 0 and 255. Labels. The possible labels are: T-shirt/top Trouser Pullover Dress Coat Sandal Shirt Sneaker Bag Ankle boot Instructions In this exercise you will implement fully connected neural networks via PyTorch. You will need to implement several settings and report the effect of each setting in terms of loss and accuracy. You should explore the following: 1. Model A - Neural Network with two hidden layers, the first layer should have a size of 100 and the second layer should have a size of 50, both should be followed by ReLU activation function. Train this model with SGD optimizer. 2. Model B - Neural Network with two hidden layers, the first layer should have a size of 100 and the second layer should have a size of 50, both should be followed by ReLU activation functionm, train this model with ADAM optimizer. 3. Model C - Dropout – add dropout layers to model A. You should place the dropout on the output of the hidden layers. 4. Model D - Batch Normalization - add Batch Normalization layers to model A. You should place the Batch Normalization before the activation functions 5. Model E - Neural Network with five hidden layers:[128,64,10,10,10] using ReLU . 6. Model F - Neural Network with five hidden layers:[128,64,10,10,10] using Sigmoid. In all these experiments you should use log softmax as the output of the network and nll loss function (see code example in recitation 8 slides). Training You should train your models using FashionMNIST dataset (the same one from ex. 3). You should train your models for 10 epochs each. You can use the code example we provide you in recitation 8 or in the PyTorch examples repository on GitHub. You should split the training set to train and validation (80:20). Note: you should load the train file for FashionMNIST manually (train files from ex3). Finally, you should use your best model to generate predictions for the examples in test x and write them into a file named test y, similarly to the previous exercise. Your predictions file should contain 5000 rows exactly. Note: Do not shuffle the test file Evaluation - Report Your report file, ex 4 report.pdf, should include the following for EACH model: 1. Plot the average loss per epoch for the validation and training set in a single image. 2. Plot the average accuracy per epoch for the validation and training set in a single image. 3. Test set accuracy (original FashionMNIST test set ). 4. Hyper parameters. Contact us for this machine learning assignment Solutions by Codersarts Specialist who can help you mentor and guide for such machine learning assignments.
- Introduction of flutter and its widgets
Why Flutter? One code base for both iOS and Android. Flutter is the only mobile SDK that provides reactive views without requiring JavaScript bridge. Flutter apps look and feel great. Make a change in the app and see them in the blink of an eye. All thanks to Hot-Reload. What’s up with “Dart”! Dart is a reactive language that talks similar to python in terms of ease of coding while keeping the power of native java under the hood. Widgets Flutter widgets are built using a modern framework that takes inspiration from React. The central idea is that you build your UI out of widgets. Widgets describe what their view should look like given their current configuration and state. There are broadly two types of widgets in Flutter. State-full Widgets and Stateless Widgets. The names are self-explanatory. State-full Widgets are sensitive to what happens within its boundaries and gets rebuilt when a state change is detected. Conversely, Stateless widgets are not state sensitive and remain static throughout its life cycle. import 'package:flutter/material.dart'; void main() => runApp(MyApp()); class MyApp extends StatelessWidget { // This widget is the root of your application. @override Widget build(BuildContext context) { return MaterialApp( title: 'Flutter Demo', theme: ThemeData( primarySwatch: Colors.blue, ), home: MyHomePage(title: 'Calculator'), ); } } class MyHomePage extends StatefulWidget { MyHomePage({Key key, this.title}) : super(key: key); final String title; @override _MyHomePageState createState() => _MyHomePageState(); } class _MyHomePageState extends State { @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text(widget.title), ), body: new Container( child: new Column(children: [ new Text("0"), // new Expanded(child: null), new MaterialButton(child: new Text("1"), onPressed: ()=> {}, color: Colors.blueGrey, textColor: Colors.white, ) ],), ) ); } } Hire an Flutter developer to get quick help for all your android |Ios app development needs. with the hands-on android assignment help and android project help by Codersarts android expert. You can contact the android programming help expert any time; we will help you overcome all the issues and find the right solution. Want to get help right now? Or Want to know price quote
- Run Flutter App
Flutter is an open-source UI software development kit created by Google. It is used to develop applications for Android, iOS, Linux, Mac, Windows, Google Fuchsia, and the web from a single codebase. The first version of Flutter was known as codename "Sky" and ran on the Android operating system Running flutter app first install vs Code and Dart extension in your visual studio code cmd for create flutter project Dart Code : for running emulator Run App : Hire an android developer | IOS to get quick help for all your android app development needs. with the hands-on android assignment help and android project help by Codersarts android expert. You can contact the android | ios programming help expert any time; we will help you overcome all the issues and find the right solution. Want to get help right now? Or Want to know price quote Please send your requirement files at contact@codersarts.com. and you'll get instant reply as soon as requirement receives
- MySQL Assignment Help
With the database in file organization.sql (attribute postal_address added) : / For each following question, give the SQL query which computes what is asked. Fill the database with data that allows you to verify that the query is working. Some data must satisfy the request and some not. Justify in the comments the relevance of the test data set. the last name and the first name of members born in 1999 ; the name and the phone number of members who live in Créteil ; for each role, the role description and the number of members with this role ; for each role, the role description and the date of birth of the youngest members ; / the name and the email address of members whose role is moniteur and who are the oldest ; the activity name and the numbers of members who practise the activity for activities with at least 10 members registered ; the name, the date of birth and the email of the youngest members who practise judo ; the names and the referrer names when the tutor is older than the member. B. Enrich the database by adding attributes or tables. Explain the choices. Fill in the new fields with data. Write 6 SQL queries using the new structure and comment in natural language on the role of the queries. Put in a zip archive the SQL file which contains the database and its contents as well as the SQL file with the queries for question A and the SQL file with the queries for question B and upload the zip file. Do not forget to put the names of the students in each file. Contact us for this MySQL assignment Solutions by Codersarts Specialist who can help you mentor and guide for such MySQL assignments. If you have project or assignment files, You can send at contact@codersarts.com directly
- Apache Spark Assignment Help | Machine Learning Using PySpark
What is PySpark? PySpark is a Python API for Spark released by the Apache Spark community to support Python with Spark. Using PySpark, one can easily integrate and work with RDDs in Python programming language too. There are numerous features that make PySpark such an amazing framework when it comes to working with huge datasets. Whether it is to perform computations on large datasets or to just analyze them, Data Engineers are switching to this tool. Key Features of PySpark Real-time computations: Because of the in-memory processing in the PySpark framework, it shows low latency. Polyglot: The PySpark framework is compatible with various languages such as Scala, Java, Python, and R, which makes it one of the most preferable frameworks for processing huge datasets. Caching and disk persistence: This framework provides powerful caching and great disk persistence. Fast processing: The PySpark framework is way faster than other traditional frameworks for Big Data processing. Works well with RDDs: Python programming language is dynamically typed, which helps when working with RDDs. Spark with Python vs Spark with Scala As it is already discussed, Python is not the only programming language that can be used with Apache Spark. Data Scientists already prefer Spark because of the several benefits it has over other Big Data tools, but choosing which language to use with Spark is a dilemma that they face. Being one of the most popular frameworks when it comes to Big Data Analytics, Python has gained so much popularity that you wouldn’t be shocked if it became the de-facto framework for evaluating and dealing with large datasets and Machine Learning in the coming years. The most used programming languages with Spark are Python and Scala. Now if you are going to learn PySpark (Spark with Python), then it is important that you know why and when to use Spark with Python, instead of Spark with Scala. In this section, the basic criteria, one should keep in mind while making the choice between Python and Scala to work on Apache Spark, are explained. Installation In Window: In this section, you will come to know how to install PySpark on Windows systems step by step. Download the latest version of Spark from the official Spark website What is SparkConf? Before running any Spark application on a local cluster or on a dataset, you need to set some configurations and parameters. This is done with the help of SparkConf. As the name suggests, it offers configurations for any Spark application. Features of SparkConf and Their Uses Here is a list of some of the most commonly used features or attributes of SparkConf while working with PySpark: set(key, value): This attribute is used to set a configuration property. setMaster(value): This attribute is used to set the master URL. setAppName(value): This attribute is used to set an application name. get(key, defaultValue=None): This attribute is used to get a configuration value of a key. setSparkHome(value): This attribute is used to set the Spark installation path. Code to run SparkConf >>> from pyspark.conf import SparkConf >>> from pyspark.context import SparkContext >>> conf = SparkConf().setAppName("PySpark App").setMaster("local[2]") >>> conf.get("spark.master") >>> conf.get("spark.app.name") What is PySpark SparkContext? SparkContext is the entry gate for any Spark-derived application or functionality. It is the first and foremost thing that gets initiated when you run any Spark application. In PySpark, SparkContext is available as sc by default, so creating a new SparkContext will throw an error. Parameters SparkContext has some parameters that are listed below: Master: The URL of the cluster SparkContext connects to AppName: The name of your job SparkHome: A Spark installation directory PyFiles: The .zip or .py files send to the cluster and then added to PYTHONPATH Environment: Worker node environment variables BatchSize: The number of Python objects represented. However, to disable batching, set the value to 1; to automatically choose the batch size based on the object size, set it to 0; and to use an unlimited batch size, set it to −1 Serializer: This parameter tells about an RDD serializer Conf: An object of L{SparkConf} to set all Spark properties profiler_cls: A class of custom profilers used to do profiling; however, pyspark.profiler.BasicProfiler is the default one Code to Run SparkContext: from pyspark import SparkContext sc = SparkContext("local", "First App") Classes of Spark SQL and DataFrames: pyspark.sql.SparkSession Main entry point for DataFrame and SQL functionality. pyspark.sql.DataFrame A distributed collection of data grouped into named columns. pyspark.sql.Column A column expression in a DataFrame. pyspark.sql.Row A row of data in a DataFrame. pyspark.sql.GroupedData Aggregation methods, returned by DataFrame.groupBy(). pyspark.sql.DataFrameNaFunctions Methods for handling missing data (null values). pyspark.sql.DataFrameStatFunctions Methods for statistics functionality. pyspark.sql.functions List of built-in functions available for DataFrame. pyspark.sql.types List of data types available. pyspark.sql.Window For working with window functions. Analyze Data using Spark SQL Relational databases are used by almost all organizations for various tasks – from managing and tracking a huge amount of information to organizing and processing transactions. It’s one of the first concepts we are taught in coding school. And let’s be grateful for that because this is a crucial cog in a data scientist’s skillset! You simply cannot get by without knowing how databases work. It’s a key aspect of any machine learning project. Structured Query Language (SQL) is easily the most popular language when it comes to databases. Unlike other programming languages, it is easy to learn and helps us start with our data extraction process. For most of the data science jobs, proficiency in SQL ranks higher than most other programming languages. Features of Spark SQL Spark SQL has a ton of awesome features but I wanted to highlight a few key ones that you’ll be using a lot in your role: Query Structure Data within Spark Programs: Most of you might already be familiar with SQL. Hence, you are not required to learn how to define a complex function in Python or Scala to use Spark. You can use the exact same query to get the results for your bigger datasets! Compatible with Hive: Not only SQL, but you can also run the same Hive queries using the Spark SQL Engine. It allows full compatibility with current Hive queries One Way to Access Data: In typical enterprise-level projects, you do not have a common source of data. Instead, you need to handle multiple types of files and databases. Spark SQL supports almost every type of file and gives you a common way to access a variety of data sources, like Hive, Avro, Parquet, JSON, and JDBC Performance and Scalability: While working with large datasets, there are chances that faults might occur between the time while the query is running. Spark SQL supports full mid-query Fault Tolerance so we can work with even a thousand nodes simultaneously User-Defined Functions: UDF is a feature of Spark SQL that defines new column-based functions that extend the vocabulary of Spark SQL for transforming datasets Executing SQL Commands with Spark I have created a random dataset of 25 million rows. You can download the entire dataset here. We have a text file with comma-separated values. So, first, we will import the required libraries, read the dataset, and see how Spark will divide the data into partitions: # importing required libraries from pyspark.sql import SQLContext from pyspark.sql import Row # read the text data raw_data=sc.textFile('sample_data_final_wh.txt').cache() How to Manage Python Dependencies in PySpark There are different methods which is used to manage the dependencies in PySpark, Which is given below: Using Conda Conda is one of the most widely-used Python package management systems. PySpark users can directly use a Conda environment to ship their third-party Python packages by leveraging conda-pack which is a command line tool creating relocatable Conda environments. Using Virtualenv Virtualenv is a Python tool to create isolated Python environments. Since Python 3.3, a subset of its features has been integrated into Python as a standard library under the venv module. In the upcoming Apache Spark 3.1, PySpark users can use virtualenv to manage Python dependencies in their clusters by using venv-pack in a similar way as conda-pack. In the case of Apache Spark 3.0 and lower versions, it can be used only with YARN. Using PEX PySpark can also use PEX to ship the Python packages together. PEX is a tool that creates a self-contained Python environment. This is similar to Conda or virtualenv, but a .pex file is executable by itself. Contact Us to Get PySpark Assignment Help, PySpark Homework Help, PySpark Project Help, and get an instant help with an affordable price, you can send your request directly at contact@codersarts.com
- Apache Spark
What is Apache spark? Apache Spark is an open-source distributed general-purpose cluster-computing framework which provides a number of inter-connected platforms, systems and standards for Big Data projects. Spark provides an interface for programming entire clusters with implicit data parallelism and fault tolerance. In simpler words, it can quickly perform processing tasks on very large data sets, and can also distribute data processing tasks across multiple computers, either on its own or together with other distributed computing tools. It utilizes in-memory caching (i.e. RAM rather than disk space) and optimized query execution for fast queries against data of any size. Simply put, Spark is a fast and general engine for large-scale data processing. These two qualities are keys to the world of big data and machine learning, which require the assembling of massive computing power to crunch through large data stores. It was originally developed at the University of California, Berkeley's AMPLab, the Spark codebase was later donated to the Apache Software Foundation, which has maintained it since. Apache Spark Ecosystem: Spark can be deployed in a variety of ways, provides native bindings for the Java, Scala, Python, and R programming languages, and supports SQL, streaming data, machine learning, and graph processing. Apache Spark Core – Spark Core is the underlying general execution engine for the Spark platform that all other functionality is built upon. It provides in-memory computing and referencing datasets in external storage systems. Spark SQL – Spark SQL is Apache Spark’s module for working with structured data. The interfaces offered by Spark SQL provide Spark with more information about the structure of both the data and the computation being performed. Spark Streaming – This component allows Spark to process real-time streaming data. Data can be ingested from many sources like Kafka, Flume, and HDFS (Hadoop Distributed File System). Then the data can be processed using complex algorithms and pushed out to file systems, databases, and live dashboards. MLlib (Machine Learning Library) – Apache Spark is equipped with a rich library known as MLlib. This library contains a wide array of machine learning algorithms- classification, regression, clustering, and collaborative filtering. It also includes other tools for constructing, evaluating, and tuning ML Pipelines. All these functionalities help Spark scale out across a cluster. GraphX – Spark also comes with a library to manipulate graph databases and perform computations called GraphX. GraphX unifies ETL (Extract, Transform, and Load) process, exploratory analysis, and iterative graph computation within a single system. Architecture At a foundational level, an Apache Spark application comprises of two main components: a driver, which converts the user's code into multiple tasks that can be distributed across worker nodes, and executors, which run on those nodes and execute the tasks assigned to them. Some form of cluster manager is necessary to mediate between the two. Moreover, Spark can run in a standalone cluster mode that just requires the Apache Spark framework and a JVM on each machine in your cluster. However, it would be much better to take advantage of a more robust resource or cluster management system to take care of allocating workers on demand for you. In the enterprise, this will normally mean running on Hadoop YARN, but Apache Spark can also run on Apache Mesos, Kubernetes, and Docker Swarm. If you seek a managed solution, then Apache Spark can be found as part of Amazon EMR, Google Cloud Dataproc, and Microsoft Azure HDInsight. Databricks, the company that employs the founders of Apache Spark, also offers the Databricks Unified Analytics Platform, which is a comprehensive managed service that offers Apache Spark clusters, streaming support, integrated web-based notebook development, and optimized cloud I/O performance over a standard Apache Spark distribution. Apache Spark builds the user’s data processing commands into a Directed Acyclic Graph, or DAG. The DAG is Apache Spark’s scheduling layer; it determines what tasks are executed on what nodes and in what sequence. Features Fast processing – The most important feature of Apache Spark that has made the big data world choose this technology over others is its speed. Big data is characterized by volume, variety, velocity, and veracity which needs to be processed at a higher speed. Spark contains Resilient Distributed Dataset (RDD) which saves time in reading and writing operations, allowing it to run almost ten to one hundred times faster than Hadoop. Flexibility – Apache Spark supports multiple languages and allows the developers to write applications in Java, Scala, R, or Python. In-memory computing – Spark stores the data in the RAM of servers which allows quick access and in turn accelerates the speed of analytics. Real-time processing – Spark is able to process real-time streaming data. Unlike MapReduce which processes only stored data, Spark is able to process real-time data and is, therefore, able to produce instant outcomes. Better analytics – In contrast to MapReduce that includes Map and Reduce functions, Spark includes much more than that. Apache Spark consists of a rich set of SQL queries, machine learning algorithms, complex analytics, etc. With all these functionalities, analytics can be performed in a better fashion with the help of Spark. Ease of use - Spark has easy-to-use APIs for operating on large datasets. This includes a collection of over 100 operators for transforming data and familiar data frame APIs for manipulating semi-structured data.
- Big Data Analysis with PySpark | Sample Assignment.
BACKGROUND: INCOME CLASSIFIER Census data is one of the largest sources of a variety of statistical information related to population. It typically includes information related to Age, Gender, Household composition, Employment Details, Accommodation Details, and so on. Till recent years, collecting census data has been a manual process involving field visits and registrations. With advances in technology, the methods of collecting this data have improved to a great extent. And so is the population! With a population of more than 7 billion, one can imagine the volume of the census data associated with it. This data is collected from a variety of sources such as manual entries, online surveys, data from social media and search engines and is in various formats. Traditional database systems are inefficient at handling such data. This is where Big Data Technologies come into picture. As per a study by U.S. Census Bureau, analytics on census data could have been helpful during the Great Recession in various ways such as avoiding job loss in Supply-Chain businesses, reducing housing foreclosure rates, and so on. Big Data Analytics refers to a set of tools and methods used to obtain knowledge from information. Application of Big Data Analytics on census data can facilitate better decision making in various Government and Industrial sectors such as Healthcare, Education, Finance, Retail, and Housing. One such application is an Income Classifier. In this project, let us take a sample of world census data and build an Income Classifier using various Big Data Techniques described in subsequent sections. LEARNING OBJECTIVES 1. HDFS and Hive for Data Storage and Management 2. Data Ingestion using Sqoop 3. Machine Learning using PySpark This Project is divided into three parts to cover the above learning objectives. DATASET The dataset named censusdata.csv is provided in your LMS. We will be using the same dataset for all the three parts. Input: The dataset contains 15 columns Targeted Column: Income; the income is provided in the form of two values: < 50k or >50k Number of other columns:14; these are demographics and other features used for describing a person List of Attributes: age: continuous workclass: Private, Self-emp-not-inc, Self-emp-inc, Federal-gov, Local-gov, State-gov, Without-pay, Never-worked fnlwgt: continuous. education: Bachelors, Some-college, 11th, HS-grad, Prof-school, Assoc-acdm, Assoc-voc, 9th, 7th-8th, 12th, Masters, 1st-4th, 10th, Doctorate, 5th-6th, Preschool education-num: continuous marital-status: Married-civ-spouse, Divorced, Never-married, Separated, Widowed, Married-spouse-absent, Married-AF-spouse occupation: Tech-support, Craft-repair, Other-service, Sales, Exec-managerial, Prof- specialty, Handlers-cleaners, Machine-op-inspct, Adm-clerical, Farming-fishing, Transport-moving, Priv-house-serv, Protective-serv, Armed-Forces relationship: Wife, Own-child, Husband, Not-in-family, Other-relative, Unmarried race: White, Asian-Pac-Islander, Amer-Indian-Eskimo, Other, Black sex: Female, Male capital-gain: continuous capital-loss: continuous hours-per-week: continuous native-country: United-States, Cambodia, England, Puerto-Rico, Canada, Germany, Outlying-US(Guam-USVI-etc), India, Japan, Greece, South, China, Cuba, Iran, Honduras, Philippines, Italy, Poland, Jamaica, Vietnam, Mexico, Portugal, Ireland, France, Dominican-Republic, Laos, Ecuador, Taiwan, Haiti, Columbia, Hungary, Guatemala, Nicaragua, Scotland, Thailand, Yugoslavia, El-Salvador, Trinadad&Tobago, Peru, Hong, Holand-Netherlands income: >50K, <=50K TASKS 1. HDFS AND HIVE Problem Statement 1 Census Analytics is a project where you need to collect the data of people along with their incomes. As the census data is usually in large volume, the analysis of the data will be a cumbersome task. To overcome this, we will be using the Hadoop Ecosystem. As a first step, you need to load the data into HDFS and create a table in Hive that can be used for querying the data. You have to create different types of tables and execute queries, as mentioned below and compare the time required for execution for different types of tables. Steps to be performed: 1. Download the dataset named censusdata.csv that is provided in your LMS 2. Load the downloaded data into HDFS 3. Create an internal table in Hive to store the data a. Create the table structure b. Load the data from HDFS into the Hive table 4. Create an internal table in Hive with partitions a. Create a Partition Table in Hive using “workclass” as the Partition Key b. Load data from the staging table (Table created in Step 3) into this table 5. Create an external table in Hive to hold the same data stored in HDFS 6. Create an external table in Hive with partitions using “workclass” as Partition Key 7. For each of the four tables created above, perform the following operations Find out the number of adults based on income and gender. Note the time taken for getting the result Find out the number of adults based on income and workclass. Note the time taken for getting the result Write your observations by comparing the time taken for executing the commands between: a. Internal & External Tables b. Partitioned & Non-partitioned Tables 8. Delete the internal as well as external tables. Comment on the effect on data and metadata after the deletion is performed for both internal and external tables. 2. DATA INGESTION Problem Statement 2 In a similar scenario as above, the data is available in a MySQL database. Due to the inefficiency of RDBMS systems to store and analyze Big Data, it is recommended that we move the data to the Hadoop Ecosystem. Ingest the data from MySQL database into Hive using Sqoop. Data pipeline needs to be created to ingest data from an RDBMS into Hadoop Cluster and then load data into Hive. To make the analysis faster, use Spark on top of Hive after getting data into the Hadoop cluster. Using Spark, query different tables from Hive to analyze the dataset. Steps to be performed: 1. Create the necessary structure in a MySQL database using the steps mentioned below: a. Create a new database in MySQL with the name midproject b. Create a table in this database with the name census_adult to store the input dataset c. Load the dataset into the table d. Verify whether data is loaded properly e. Verify the table for unwanted data such as ‘?’,’Nan’ and ‘Null’ f. Get the counts for the columns which contain unwanted data g. Clean the data by replacing the unwanted data with others 2. Import the above data from MySQL into a Hive table using Sqoop 3. Connect to PySpark using web console to access the created Hive table. Perform the following queries and note the time taken for execution in each of the queries. a. Query the table to get the number of adults based on income and gender b. Query the table to get the number of adults based on income and workclass Hint: To access Hive tables using Spark console, use the following commands: >>pyspark2 >>from pyspark.context import SparkContext >>from pyspark.sql import HiveContext >>sqlContext = HiveContext(sc) 4. Access the following two tables created as part of Problem 1 (HDFS and Hive) and perform the steps as mentioned below: a. Access Hive External Table with partition i. Query the table to get the number of adults based on income and gender ii. Query the table to get the number of adults based on income and workclass b. Access Hive Internal Table with Partition i. Query the table to get the number of adults based on income and gender ii. Query the table to get the number of adults based on income and workclass Make a note of the time taken for getting the result in comparison with the time taken to get results with Hive. 5. Comment on the time taken for executing these commands using Spark as compared to the time taken for execution in Hive (Problem Statement 1). 3. INCOME CLASSIFIER Problem Statement 3 Income Classifier is an application that will be used to classify individuals based on the annual income. An individual’s annual income may be influenced by various factors such as age, gender, occupation, education level, and so on. Write a program to build classification models using PySpark. Explore the possibility of classifying income based on an individual’s personal information. Perform the following steps to build and compare different classifiers. Use Jupyter Notebook to write the program. Steps to be performed: 1. Load data using PySpark 2. Perform Exploratory Data Analysis (EDA) and Data Cleaning based on the following points: a. Find the shape and schema of the dataset b. Obtain insights (statistics) of different columns c. Obtain the Unique values of Categorical Columns d. Check if any unwanted values are present in the data such as Null, ? or NaN e. Remove unwanted values if present in any of the columns (numerical as well as categorical columns) f. Obtain the relationship between different columns using covariance which shows the degree of interdependence of the two columns g. Obtain distinct values and their counts in categorical columns. h. Create a crosstab on two different columns (example, age & workclass) i. Perform an “Integer Type Check” on the columns of the Spark DataFrame and display the columns satisfying the same j. Obtain correlation between the above columns using pandas scatter plot 3. Data Preprocessing Since we are going to use classification algorithms like Logistic Regression, we will have to convert all the categorical columns in the dataset to numerical values. We can achieve this using 1) Category Indexing In this, we assign a numerical value to each category (eg: Male: 0, Female: 1) 2) One-Hot Encoding a. Conversion of categorical columns into Numerical Columns i. Category Indexing using string indexing for all categorical columns ii. Label Indexing for income column as income_class iii. One Hot Encoding which generates binary columns for features iv. Use Vector assembler to get a single vector column for features v. Make it as an array of stages so that it can be passed to a pipeline This converts categories into binary vectors with at most one nonzero value (eg: (Blue: [1, 0]), (Green: [0, 1]), (Red: [0, 0])) In this step, we will be using a combination of Category Indexing and One-Hot Encoding (Note: Make sure that the output column name for Income should be income_class) 4. Build the Pipeline to perform multiple tasks a. Pass the stages of Data Preprocessing (created in Step 3) to the pipeline to create an instance with the stages b. Estimator that can fit on a DataFrame to produce a model c. Transform the DataFrame with features to DataFrame with predictions d. Generate a DataFrame which can hold a variety of datatypes including feature vectors 5. Split the dataset into two parts (80%-20%) as Train and Test Datasets a. Check the shape of the datasets b. Check the distribution of income class (0,1) in train and test dataset 6. Build the following Classifiers a. Logistic Regression b. Decision Tree c. Random Forest d. Gradient Boosted Tree e. Naïve Bayes Common Tasks for all the Classifiers: Train and Evaluate the Model Print ROC metrics & model accuracy Tune the Hyperparameters and print the improved accuracy Compare the accuracy of the 5 models and comment on the models which performed better as compared to other in the list. If you need solution for this assignment or have project a similar assignment, you can leave us a mail at contact@codersarts.com directly.
- Student Scheduler | A Student Progress Tracking App | CodersArts
This App Help parents and Teachers to track progress report of student by using this App In this app we have added features like student information teacher information and student parent details into this App. Teacher can assign the student Work and his/her progress and update student progress day by day, then teacher can read the information about the student. when parent or teacher open the app we go to splash activity of an app n go to the home page. 2. When student open navigation page there is a List Of Terms, Courses Term Wise, List of Courses and List Of Assessments. 3. In the assessment page there is Add New Courses Give the Information of Tittle Course Start date , Course End Date, Status , Mentor Information Mentor Mobile Number ,Email at the end on Note page Give the Student Progress details. In In the Term wise parent and teacher can track student progress Report Know where student needs improvement, Hire an android developer to get quick help for all your android app development needs. with the hands-on android assignment help and android project help by Codersarts android expert. You can contact the android programming help expert any time; we will help you overcome all the issues and find the right solution. Want to get help right now? Or Want to know price quote Please send your requirement files at contact@codersarts.com. and you'll get instant reply as soon as requirement receives











