Search Results
737 results found with an empty search
- Machine Learning Project Assignment Help
We are providing the top rated machine learning project assignment help in given areas, we are also providing the other python related assignment help services with affordable prices Machine Learning Task on which we are providing the top rated services Machine Learning Project Classification Trees Optimization methods Concept Learning Unsupervised Learning Machine Learning Problems Machine Learning Techniques Logistic Regression Supervised Learning Reinforcement Learning Supervised learning Linear models for regression and classification Overfitting and regularization Naïve bayes and logistic regression Vector machines Unsupervised learning Expectation-maximization Mixture of Gaussians Factor analysis K-means Deep learning Neural networks for regression and classification Unsupervised models Autoencoders Instance-based learning Decision tree induction Maximum likelihood Probabilistic inference Artificial neural networks Perceptron, back propagation Clustering algorithms Dimensionality reduction techniques Kernel methods Kernel PCA Kernel Ridge Regression Send your Advanced Machine Learning assignments at contact@codersarts.com or else upload it on the website. Instant Connect to us on live chat for Advanced Machine Learning Homework help. #machineLearningprojcethelp #machineLearningassignmenthelp
- Jupyter Notebook Homework Help
Jupyter Notebook Homework Help Codersarts is top rated website for Machine learning Projects, Assignments, data science homework help and Programming Homework Help. Our dedicated team of Machine learning assignment expert will help and will guide you throughout your learning Machine learning journey. The most common IDE used for data science and machine learning work is jupyter notebook. Get jupyter notebook help at Codersarts with step-by-step explanations. Our online jupyter notebook homework help tutors are available 24*7 to help you with your toughest Machine Learning problem us. Please send us your machine learning project inquiries with deadline at codersarts@gmail.com for the Machine Learning Assignment Solution. OR contact us for machine learning assignment solutions. What is Jupyter Notebook? The Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations and narrative text. Uses include: data cleaning and transformation, numerical simulation, statistical modeling, data visualization, machine learning, and much more. Jupyter Notebook is web application which is most commonly used for python programming or we can say specially for machine learning task. Jupyter Notebook is well structured ways of writing code and comments in different shell.. Here is key points about Jupyter Notebook: Python programs are plain text files. Use the Jupyter Notebook for editing and running Python. The Notebook has Command and Edit modes. Use the keyboard and mouse to select and edit cells. The Notebook will turn Markdown into pretty-printed documentation. Markdown does most of what HTML does. Why do we use Jupyter? Teachers are responsible for many activities like including creating lessons, lectures, courses, assignments, and supportive environments; encouraging engagement and performance in the classroom; Helping students learn to think critically so they can become lifelong learners and problem solvers; Making material relevant and meaningful to students’ diverse interests and backgrounds; Assessing student learning (including grading and evaluation); Encouraging students to persist with emotional labor (feedback, communication, etc.); and trying out teaching and learning practices that improve our ability to do all of these things. So Jupyter notebooks was developed to solve learning environments and experiences and incorporating Jupyter notebooks in teaching has allowed to improve students’ understanding of course content, increase student engagement with material and their participation in class. As an educator, can use Jupyter notebooks to increase your students’ 1) engagement, 2) participation, 3) understanding, 4) performance, and 5) preparation for their career. JupyterLab is a web-based interactive development environment for Jupyter notebooks, code, and data. JupyterLab is flexible: configure and arrange the user interface to support a wide range of workflows in data science, scientific computing, and machine learning. JupyterLab is extensible and modular: write plugins that add new components and integrate with existing ones So, whether it is simple python script or data science work we us Jupyter notebook, JupyterLab etc Our Machine Learning Assignment help tutors will ensure that your programming skills improve within a short span. #WebsiteForProgrammingHelp. #BestProgrammingHelpWebsite #NeedHelpInProgrammingHelp #NeedProgrammingAssignmentHelp
- COMP518 Assignment 3: MySQL Assignment Help
The submission of your solutions should be in PDF or DOC format. The MySQL com- mands in questions 1 and 2 should be submitted separately in a plain text format (.TXT) le. You may include your MySQL code also in the pdf le, for the sake of clarity, if you wish, but it should be stressed that only the code that appears in the txt le will be assessed. Make sure that you test that your MySQL code works in the version installed in the lab, because this is the version which is going to be used for the assessment. Please write your full name and student id number on the rst page of your submitted solutions. Learning outcomes: Critical understanding of the nature of relational databases. Design and implement large-scale database systems. Develop the ability to use SQL as a data denition and data manipulation language, and to develop a critical understanding of querying a relational database withSQL. Develop a systematic understanding of transaction management and concurrency control in database systems Assessment's purpose: Create a relational database and express queries to a relational database by using SQL. Check concurrency control. Find the outcome for simultaneous transactions. Failure in the assessment may be compensated for by higher marks in other components of the module. Marking of subquestions will be based on the marking descriptors of the University's Code of Practice on Assessment. Standard UoL penalty applies for late submission. Please be aware of the University guidelines on plagiarism and collusion. Question One (30 marks) Consider the following relational database schema, Book(isbn, title, publisher) Author(id, name) Writes(isbn, id) BookStore(bsid, address, bsName) Sells(bsid, isbn) 1. (8 marks) Create the above schemas in MySQL, using the CREATE TABLE state- ment. Make sure that you dene all possible keys, and that entity integrity and ref- erential integrity are guaranteed. Explain in detail any assumptions you may make. 2. Provide MySQL queries for the following: (a) (2 marks) Find the addresses of all the bookstores, which sell the book with title `Database Systems'. (b) (3 marks) Find the titles of all the books written by `Agatha Christie'. Order the titles in ascending order (c) (5 marks) Find the titles of the books which are written by `Agatha Christie' but not `Ian Rankin'. (d) (6 marks) If a book is written by more than one author, those authors `co-authored' this book. Find the names of the authors who have written some `co-authored' books. (e) (6 marks) List the names of the authors that wrote more than 5 books, along with the number of the books they wrote, in decreasing order of the number of books they wrote. Hint: A good idea would be to populate sample data into your database using MySQL. This will help you to verify that your MySQL queries are correct. Question Two (30 marks) Consider the following relational database schema, Employees(eid, ename, age) Department(did, dname, dtype, address) WorksIn(eid, did, since) Products(pid, pname, ptype, pcolor) Sells(did, pid, quantity); 1. (8 marks) Create the above schemas in MySQL, using the CREATE TABLE state- ment. Make sure that you dene all possible keys, and that entity integrity and ref- erential integrity are guaranteed. Explain in detail any assumptions you may make. 2. Provide MySQL queries for the following: (a) (2 marks) Find the names of departments which sell blue products. (b) (4 marks) Find the names of departments which sell blue products and do not have any employee older than 40. (c) (5 marks) For each department report the department-id and the age of the oldest employee working in it. (d) (5 marks) Find the names of employees who are older than at least one employee working in department `Central'. (e) (6 marks) Find the names of employees working in departments which have sold at least 5 types of products. Hint: A good idea would be to populate sample data into your database using MySQL. This will help you to verify that your MySQL queries are correct. Question Three (26 marks) Assume that there are three transactions T1; T2; T3 that operate (read and write) on the data items A, B, and C. We are using the following notation: RJ(X) means that the transaction TJ reads the data item X, while WJ(X) means that the transaction TJ writes on the data item X. For example R1(A) means that the transaction T1 reads the data item A, i.e., read(T1;A), while W3(B) would mean that the transaction T3 writes on the data item B, i.e., write(T3;B). You are given the following schedules S1, S2 S1: R1(A),R1(B),W1(A),R2(A),R1(C),W1(C),R3(C),W2(A),R3(B),W3(A) S2: R1(A),R1(B),W1(A),R2(A),W3(C),W1(C),W2(A) For each of the above schedules (5 marks) create the precedence graph of the con (2 marks) show whether the schedule is conict-serializable or not. In case it is con serializable, show a corresponding serial schedule. In case it is not con explain shortly why this is the case. (6 marks) can this schedule occur by use of (two-phase locking) 2PL? Explain your answer. Question Four (14 marks) Consider the following transactions T1 and T2 (2 marks) What are the nal values of the data items A, B and C if we rst execute T1,and then T2? What nal value does the "product" have? (2 marks) What are the nal values of the data items A, B and C if we rst execute T2, and then T1? What nal value does the "product" have? contact us for this assignment solution or Send your project/assignment directly at codersarts@gmail.com
- Get Solution : Machine Learning Assignment Help #1
Purpose In this assignment, you need to demonstrate your skills for data clustering and dimensionality reduction. There are two parts of this assignment Instructions This is an individual assessment task of maximum 20 pages including all relevant material, graphs, images and tables. Students will be required to provide responses for series of problem situations related to their analysis techniques. They are also required to provide evidence through articulation of the scenario, application of programming skills, analysis techniques and provide a rationale for their response Task A - Clustering Download BBC sports dataset from the Cloud. This dataset consists of 737 documents from the BBC Sport website corresponding to sports news articles in five topical areas from 2004-2005. There are 5 class labels: athletics, cricket, football, rugby, tennis. The original dataset and raw text files can be downloaded from here There are 3 files in the dataset corresponding to the feature matrix, the class labels and the term dictionary.You need to read these files in Python notebook and store in variables X, trueLabels, and terms. (5 marks) Next perform K-means clustering with 5 clusters using Euclidean distance as similarity measure. Evaluate the clustering performance using adjusted rand index and adjusted mutual information. Report the clustering performance averaged over 50 random initializations of K-means (5 marks) Repeat K-means clustering with 5 clusters using a similarity measure other than Euclidean distance. Evaluate the clustering performance over 50 random initializations of K-means using adjusted rand index and adjusted mutual information. Report the clustering performance and compare it with the results obtained in step 2 (5 marks) For clustering cases (Euclidean distance and the other similarity measure), visualize the cluster centres using Tag cloud using Python package WordCloud. Task B - (Dimensionality Reduction using PCA/SVD For the provided BBC sports dataset, perform PCA and plot the captured variance with respect to increasing latent dimensionality. What is the minimum dimension that captures (a) at least 95% variance and (b) at least 98% variance? Submission details University has a strict standard on plagiarism as a part of Academic Integrity. To avoid any issues with plagiarism, students are strongly encouraged to run the similarity check with the Turnitin system, which is available through Unistart. A Similarity score MUST NOT exceed 39% in any case. Late submission penalty is 5% per each 24 hours from 11.30pm, 22nd of August. No marking on any submission after 5 days (24 hours X 5 days from 4pm 10th of August) Be sure to downsize the photos in your report before your submission in order to have your file uploaded in time. Contact us for solution of this Machine Learning assignment help by codersarts expert or send your project/assignment directly at codersarts@gmail.com
- Python Programming Assignment Help
1. We discussed the One-Time-Pad cipher and showed that Eve’s guesses for the key are futile as she can get any reasonably looking result. Check that the second key she guessed indeed decrypts the ciphertext to “LATER”. If it does, what should be the key stream to give “NEVER” instead. If it does not, correct the key so that you do get “LATER”. You can (of course) write a computer program in the language of your choice to help with this. 2. Implement a simple OTP cipher (in Python or any other language) that uses XOR for encryption. That is, your program should be able to read key material from a file and combine it with the plaintext data from another file to produce ciphertext, and vice versa (ciphertext to plaintext). Otherwise, design, implementation or interface details are up to you. 3. Consider the RSA cipher. Assume that the following two prime numbers are selected, P=7 and Q=11. Compute N and W. Select a valid public exponent E. Given the selected public exponent E, compute the private exponent D. What are the public key and private key here? Show an example encryption and decryption with these keys. 4. During the lectures we have seen how the generic RSA encryption and decryption can be done in Java using the BigInteger numbers. Big integers are the default in Python, implement the same generic RSA algorithms in Python. For this you will need the modular power operation and modular inverse. For the first, you can use pow(x,y,z) which gives you x y mod z, for the second use Google to find a suitable implementation of the Euclidean algorithm in Python. 5. Following the same principles, implement the generic Diffie-Hellman scheme in Python as it was done in Java during the lectures. 6. For RSA, the generic algorithm that works on (large) integers is in essence the same as the crypto library implementation. The library implementation only differs from the generic one in that it: pads the data automatically to provide input of a fixed bit length, and transforms the character/byte input into a corresponding (large) integer. Write a Python (or Java if you prefer) program that verifies that this is indeed one and the same thing by using one method (the generic one that you developed in exercise 4) to encrypt and the other (crypto library) to decrypt some message. To make this work you need to provide your own padding (and consequently use no-padding option with the crypto library) and represent character strings as large integers. 7. Come up with a method (describe it briefly) and write a program to measure RSA performance (encryption/decryption). Try different key sizes. What are your conclusions? get solution of this python programming assignment help by codersarts expert or send your project/assignment directly at codersarts@gmail.com
- Boat Managment System Queries with Solutions using MySql
The boat management system is a schema to manage the data regarding sailors, boats and reserves. By creating various tables in the database we can easily manage these data. First, we have to create the database "boats" : mysql> CREATE DATABASE boats; Then we have to use the boats database: USE boats; In the database we have to create different tables: Creating table sailors CREATE TABLE sailors ( sid integer, sname varchar(20), rating integer, age integer ); Creating table boats CREATE TABLE boats ( bid integer, bname varchar(20), color varchar(20) ); Creating table reserves CREATE TABLE reserves ( sid integer, bid integer, day1 date ); After creating all the tables, we have to insert records into these tables: Insert records into the sailors table: insert into sailors values(22,'dustin',7,45); insert into sailors values(29,'brutus',1,33); insert into sailors values(31,'lubber',79,55); insert into sailors values(32,'andy',8,25); insert into sailors values(58,'rusty',10,35); insert into sailors values(58,'buplb',10,35); insert into sailors values(58,'buplerb',10,35); insert into sailors values(22,'bb',10,35); Insert records into the boats table: insert into boats values(101,'interlake','blue'); insert into boats values(102,'interlake','red'); insert into boats values(103,'clipper','green'); insert into boats values(104,'marine','red'); Insert records into the reserves table: insert into reserves values(22,101,'2004-01-01'); insert into reserves values(22,102,'2004-01-01'); insert into reserves values(22,103,'2004-02-01'); insert into reserves values(22,105,'2004-02-01'); insert into reserves values(31,103,'2005-05-05'); insert into reserves values(32,104,'2005-04-07'); After all creating database, creating tables and then inserting records into them, we have to perform queries on these tables: Problem#1: Find the names of sailors who have reserved a red boat. Solution: SELECT s.sname FROM sailors s JOIN reserves r ON r.sid=s.sid join boats b ON r.bid=b.bid where b.color='red'; Problem#2: Find the names of the Sailors who have reserved at least one boat. Solution: SELECT sname FROM sailors WHERE sid IN ( SELECT sid FROM reserves GROUP BY sid ); Problem#3: Compute increments for the ratings of persons who have sailed two different boats on the same day. Solution: SELECT r.sid, r.day1, COUNT(*), s.rating FROM reserves r JOIN sailors s ON r.sid=s.sid GROUP BY day1 HAVING COUNT(r.day1)=2; /*Or*/ SELECT s.sid, s.sname, COUNT(r.sid) c, s.rating+1 "rating" FROM sailors s JOIN reserves r ON s.sid=r.sid GROUP BY day1 HAVING c>1; SELECT * FROM sailors; Problem#4: Find the ages of sailors whose name begins and ends with B and has at least 3 characters. Solution: SELECT sname, age FROM sailors WHERE sname LIKE 'B%_%B'; Problem#5: Find the names of sailors who have reserved a red and a green boat. Solution: SELECT s.sname, b.color, s.sid FROM sailors s JOIN reserves r ON r.sid=s.sid JOIN boats b ON r.bid=b.bid AND b.color='red' WHERE r.sid IN( SELECT s.sid FROM sailors s JOIN reserves r ON r.sid=s.sid JOIN boats b ON r.bid=b.bid WHERE b.color='green' ); Problem#6: Find the sids of all sailors who have reserved red boats but not green boats. Solution: SELECT s.sname, b.color, s.sid FROM sailors s JOIN reserves r ON r.sid=s.sid JOIN boats b ON r.bid=b.bid AND b.color='red' WHERE r.sid NOT IN( SELECT s.sid FROM sailors s JOIN reserves r ON r.sid=s.sid JOIN boats b ON r.bid=b.bid WHERE b.color='green' ); SELECT s.sname, b.color, s.sid FROM sailors s JOIN reserves r ON r.sid=s.sid JOIN boats b ON r.bid=b.bid WHERE b.color='green'; Problem#7: Find the sailors with the highest rating. Solution: SELECT sname, max(rating) FROM sailors; Problem#8: Find the name of the oldest sailor. Solution: SELECT sname FROM ( SELECT sname,max(age) FROM sailors ) t1; Problem#9: Count the number of different sailor names. Solution: SELECT COUNT(*) FROM ( SELECT sname FROM sailors GROUP BY sname ) t1; Problem#10: Find the no. of sailors who is eligible to vote for each rating level. Solution: SELECT COUNT(sname), rating FROM sailors WHERE age>18 group by rating; We are codersarts provides the best solutions for any type of database questions solutions and answers like mysql query, query optimisation, MySQL Homework Help, MySQL Assignment Help, need help in sql query. Contact us now Get solutions of database query related to mysql assignment help #mysqlPracticeExercises #mysqlworksheets #mysqlProjectsForPractice #mysqlWorkbenchExercises #mysqlPracticeDatabase #mysqlExamQuestions #mysqlExercisesWithAnswers #mysqlLabExercisesWithSolutions
- MySQL Assignment Help
In this blog, we will write some MySQL queries to find the missing value in the given interval. Here list of integer values are given values: 1, 2, 5, 6, 7, 10, 11, 12 Query to create the table and insert values into this tables: Query 1 : mysql> create table input( id int not null primary key ); insert into input(id) values (1),(2),(5),(6), (10), (11), (12); Solution: It displays missing value with a range between the last value. mysql> select start, end from ( select m.id + 1 as start, (select min(id) - 1 from input as x where x.id > m.id) as end from input as m left outer join input as r on m.id = r.id - 1 where r.id is null ) as x where end is not null; Output: 3 4 7 9 It displays missing value with the range including last set(any default)value(16). Solution: select x.start, ( case when (x.end is null) then 16 else x.end end) as end from ( select m.id + 1 as start, (select min(id) - 1 from input as x where x.id > m.id) as end from input as m left outer join input as r on m.id = r.id - 1 where r.id is null ) as x; Output 3 4 7 9 13 16 Query 2 : Overlapping order in the given time periods In this query, we will find the: mysql> create table order(id integer, item varchar(100), starttime time, endtime time); insert into order(id, item, starttime, endtime) values(1, "Cake", 083000, 113000); insert into order(id, item, starttime, endtime) values(2, "Chicken", 110000, 123000); insert into order(id, item, starttime, endtime) values(3, "Chicken", 114000, 010000); insert into (id, item, starttime, endtime) values(4, "Steak", 080000, 100000); select * from order; Solution: mysql> update order set endtime = TIME_FORMAT('12:59:00', '%H:%i:%s') where id = 3; select t1.id,(select count(*) from order as t2 where ( (t2.cooktime >= t1.order) and (t2.starttime <= t1.endtime) and (t2.id <> t1.id) ) or ( (t2.endtime >= t1.starttime) and (t2.endtime <= t1.endtime) and (t2.id <> t1.id) ) ) as maxcount from order as t1 ; #mysql #mysqlassignemnthelp #mysqlprojecthelp #mysqlhomeworkhelp
- Implementing Dijkstra Algorithm Using Data Structure
Here below Details description about, how to implement Dijkstra Algorithm : In this assignment, you will experiment with graphs, and graph algorithm. A social network can be represented as a graph whose vertices represent people and whose edges represent relationships between people. You will implement a program that reads in and analyzes a social network, where the relationship is defined as “knowing” one another. If two people know one another, there will be an undirected edge connecting their corresponding vertices in the graph representation of the social network. Your program will analyze the minimum, maximum and average degree of vertices in the network, the average shortest path length between every pair of persons, the longest shortest path length between two people, and the largest clique in the graph (a set of people who all know each other). Specifically: 1. Your program will take a file name as an argument. The first two lines of the file will contain the number of persons P and number of “knows” relationships R in the file, respectively. The next P lines each start with a consecutive integer (1..P) followed by a space, followed by the person’s name, which is a string of lowercase characters (a-z). The remaining R lines each consist of two integers u and v (1≤u , v≤P ,u≠ v ) separated by a space, which implies that person u and person v know each other. A sample input is attached below. 2. Your program will represent the information from the file as a graph using either an adjacent list or adjacent matrix representation. 3. Your program will compute and output several statistics about the graph. A sample output is attached below. Number of vertices Number of edges Minimum degree of a vertex – the degree of a vertex is the number of edges connected to the vertex, i.e., the number of people that person knows. Maximum degree of a vertex Average degree over all vertices, i.e., the average number of people each person knows. Average shortest path length between pairs of vertices (You need to apply Dijkstra Algorithm in this step) Longest shortest path between two vertices Size and members of the largest complete subgraph (clique) in the social network, i.e., where everybody knows everybody. If more than one largest group occurs, then output any one of them. Note: Finding the largest clique in a graph is a NP-complete problem, i.e., may incur an exponential running time in the number of person P in the graph. So, you should implement an efficient version of the clique-finding algorithm, but any version that always finds the maximal clique may take a long time for large graphs. Have fun! Sample – Input 8 11 1 bob 2 tom 3 george 4 john 5 mary 6 sally 7 jane 8 allice 1 2 2 3 3 4 4 5 2 6 2 7 3 6 3 7 6 7 6 8 7 8 Sample – Output Vertices: 8 Edges: 11 Minimum degree: 1 Maximum degree: 4 Average degree: 2.75 Average shortest path length: 1.96 Longest shortest path length: 4 Maximum clique size: 4 Maximum clique members: 2 tom 3 george 6 sally 7 jane Explanation: Sample – Input 8 11 1 bob 2 tom 3 george 4 john 5 mary 6 sally 7 jane 8 allice 1 2 2 3 3 4 4 5 2 6 2 7 Edge 3 6 3 7 6 7 6 8 7 8 In Longest Path Matrix, you need to create a matrix by calculating longest path between two nodes like shortest Path matrix. I hope you can do it itself, after doing it please comments in below sections so we can verify your answer and if anything is needed to modify your code then we can easily added to this.
- Machine learning Logistic Regression Using K fold cross-validation
Requirements : Find 2 datasets, one for regression and the other for classification Regression: linear regression, polynomial regression(upto deg=3), random forest, SVM Classification: the other for classification using logistic regression, KNN, random forest, SVM Project Requirements: No. of rows >=1000 No. variables > 2 No. of classes for the dependent variable must be more than 2 for classification Do K-fold cross-validation for both. For regression show: R2, Adjusted R2, RMSE, correlation matrix, p-values of independent variables (codes 10) For classification show: Accuracy, confusion matrix, (Macro recall and precision for multiclass Classification) (codes 10) Do hyper-parameter tuning using Grid Search The report should discuss the properties of the datasets, your results, and model performance comparisons, and inferences/conclusions. (10) Prepare a report to discuss the properties of the datasets, your results, and inferences. (10) Here solution of this which fulfill the above requirements : Import Libraries >>> import pandas as pd >>> import numpy as np >>> import matplotlib.pyplot as plt #Data visualization libraries >>> import seaborn as sns >>> %matplotlib inline Load Data Creating methods to update columns fields values Applying these methods on pandas datasets to update values In the next steps are done logistic regression, if you need the complete solution with k fold to implement logistic regression classification then please contact us here or you can also comment in below comments section.
- Python String Methods And Its Uses
In this blog, we will learn all python String Methods and how to implement these methods with python coding parts. Now lets we will start with all-important python string topics : 1 - count() Count appearance of the word in the strings >>> string = "this is an apple, apple is delicious food" >>> c = string.count("apple") >>> print(c) Output: 2 Search specified value in the given range It is also used to search specified value within the given range: >>> c = string.count("apple", 10, 20) 2 - capitalize() Use to change the first letter of string lowercase to upper case. >>> c = string.capitalize() Output: This is an apple, apple is delicious food. 3 - center() Use to centralized the specified string. >>> str = "codersarts" >>> a = str.center(10) >>> print(a) It prints a string in the middle of 18 space which is taken up. Output : ----codersarts---- Fill this space with another character >> a = str.center(10, 's') >>> print(a) Output : sssscodersartssss 4 - find() It is the same as index(), but here little difference between find() and index() methods. find() return -1 if the value is not found and index() return exception if the specified value is not found. >>> a = str.find("o") It returns the index value of the first "o" in the strings. >>> print(a) Output : 1 Find specified string into the given range >>> a = str.find("r", 5, 8) Output : 7 5 - format It used to format the value and insert it into the specified string place holder. >>> print("Hi, this is {} and located in {}".format("codersarts", "India") ) or >>> print("Hi, this is {name} and located in {location}".format(name = "codersarts", location = "India") ) or >>> print("Hi, this is {0} and located in {1}".format("codersarts", "India") ) Formatting Types Inside place holder, you can use different types of formating :interger value - Use for right align the value as per given inter value :for :2f - Use to fixpoint number decimal >>> print("the price of the notebook is {:2f}, which is good ".format(49.505) ) Output is : the price of the notebook is 49.50, which is good or >>> print("the price of the notebook is {:<8}, which is good ".format(49.505) ) the price of the notebook is 49.50 , which is good Thanks for reading this blog if anything is missing then comments in below or need help in any types project then contact us at here
- Working with Git
Here Some New concepts introduced here are: Branch A branch is a copy of the main codebase that is hosted in the repository. All repositories start with one 'master' branch. You can create a new branch from the repository to build a new feature or run an experiment. Any commits made in a branch will not show up in master. Merge To merge is to join two GIT branches. For example, if you are done building a new feature in a branch, you can merge that branch into master. Once you are done the merging, all of the new commits made in the branch will be added to the master. Fork A fork is a copy of the entire repository. A fork includes not just the code, but also all of the branches and history of the repo. Working in a fork allows you to make changes to the repo without affecting the original. Pull Request When working in a team it is important to be able to see and approve changes made to the codebase. A pull request is a way for a collaborator to propose a set of changes. Pull requests are made from one branch to another, For example, if Alice were developing a feature in her fork of the main repository, she can create a pull request to the main repo so that her teammate Bob can see the proposed code changes to add a new feature. If the code changes are approved, then Alice can resolve the Pull Request by merging the branch. Merge Conflict One error that you might run into as you are collaborating with teammates is a merge conflict. If multiple collaborates edit the same file, GIT might not be able to resolve it automatically. When this happens it creates a merge conflict that the developers have to resolve manually. Github team repository, organization, workflow Now that you have a team, lets set up the Github organization, repository and practice the workflow. The team will only need to be step one time. The instructor will be using the commit history to see the work that each team member has put in, and it will factor into your grade for this project. Start by creating a new team organization in Github. At the top of the screen, you will see the option for creating a new organization. Go ahead and follow the instructions to set up the organization and invite all of your team members. Next, create a new team repository When you create the new reop, you can set the owner to be the organization Everyone on the team should be able to view this repository Open up the repository that your team created, and fork the repository You should see an option to fork the repository at the top right of the page. Once you fork the repository you should see that you now have a copy of the entire project including the same commit history. you can see that repository was forked from organization repo. Edit the README in your fork of the repo and commit the changes In your fork of the repo, go ahead and edit README.md. Once you commit your changes, you should see that this branch is one commit ahead of the master repo. I hope it may help with a basic concept regarding the GitHub if you need other help related to python, java, C, C++ or any other programming languages or projects related help then please contact us, so we can solve your issue. Please give an comments in below comments section so we can make changes if something missing or need for modification.
- JavaFX Applications Help
The Application Class and Setting a Scene. To help us explore the JavaFX modules, packages, and classes, open up the Java Version 9 API. This version of the API has a really helpful search bar that you can use to quickly find the classes we need. To make an Application in Java we have to do several things: Design a scene. Set the scene on a stage. Show the stage. You might notice that the words used to describe making an application are a lot like presenting a play in real life. We can set up multiple scenes and switch between them on our stage. Then, we reveal each scene like pulling back the curtain on stage. For our first example, we will be using the javafx.graphics module along with our typical java.base module we are so familiar with. Our graphics will be organized into a Group. The graphics we want to show must be added to list kept for us in our Group. The Group is called a node in the graphics tree – more on this later. Example 1.1 import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.Group; import javafx.stage.Stage; public class Fun extends Application { public static final int SCENE1_WIDTH = 400; public static final int SCENE1_HEIGHT = 300; public void start(Stage stage) { Group root = new Group(); Scene scene1 = new Scene(root, SCENE1_WIDTH, SCENE1_HEIGHT); stage.setTitle("My Fun Application!"); stage.setScene(scene1); stage.show(); } } Run this application file! Notice that we did not make the Stage. The Stage we are setting up is a parameter this passed to the start method. The start method is automatically called with a Stage created by the Java Virtual Machine whenever we choose to run an application. You can think of the start method as being similar to the main(String[] args) method that we used with non-graphics applications. After creating our Group, which is a root node in our tree graph (again don’t worry, I’ll explain what that means in a little while), we create a scene. Check out the Scene constructors in the API, what do you notice! Hopefully you notice that they all have a parameter caller Parent root. The root is just a description for what it is, but the important thing to realize is that the root is a Parent. Parent is a subclass of Node. A Parent is a node that can have other Node objects attached to it. Since Group subclasses Parent, a Group is a Parent Node Before displaying our scene, we set the stage’s title, scene, and finally show it! Before we go any further with this we need to discuss Lists. Lists are like arrays, but you are not set with one size and that’s all. A List can grow and shrink in size as you need it. Java keeps all graphical shapes and text in a GUI application in lists, so we need to know how to use them! You add to a list with the add method and remove with remove method. To access an element in a list, you use the get method with the index in the list of the item you want. There are a couple of trade offs about lists – they can only hold Object types and you must type them using what are called angle braces < >. When a class requires you to set its type, the class is said to be using generics. List is an interface that is implemented by several classes. Recall that it is typically preferred to type instances as their interface for greater flexibility. Since the return types and some parameter types are set by you, we use the letter E to represent “element type” meaning String, Node, Group, or whatever other Object you want the List to hold. There are quite a few methods in the List interface, but the most important are shown in Diagram 1.1 below. Be sure to confirm that you can find this interface. You can search the API for it, or find it in the java.base module in the java.util package Diagram 1.1 Important Methods of List Interface boolean add(E element) : Adds the element of type T to this list and returns true if it adds successfully (for most List adding is always successful) . E get(int index) : Returns the element at index E remove(int index): Returns and removes the element at index. E set(int index, E newElement): Replaces the element at index with the newElement and returns the old element that was there. int size(): Returns the number of elements in this list. Now let’s briefly look at a couple of examples of basic classes that use List. The next example create two lists using two different instantiating classes. For a full description of all classes that can make a List check out the API’s list of all known implementing classes. Example 1.2 List instances using LinkedList and ArrayList class. import java.util.List; // List interface import java.util.ArrayList; // class that implements List import java.util.LinkedList; // another class that implements List public class ListExample { public void exampleA() { // we have to use < > around the element type List words = new ArrayList(); words.add("hi"); words.add("I"); words.add("am"); words.add("making"); words.add("a"); words.add("list"); System.out.println(words ); System.out.println("Size = " + words.size()); words.set(3, "made"); words.remove(2); System.out.println(words); System.out.println("Size = " + words.size()); } public void exampleB() { // another class to implements List is LinkedList // LinkedList are faster at accessing the first and last // element, but slower in the middle. List nums = new LinkedList<>(); // notice we do not have to put Integer in the second <> // notice we use Integer, not int, because a List // can only hold Object types nums.add(1); nums.add(23); nums.add(15); int total = 0; // we can use for - each loops with lists! for(Integer x : nums) { total += x; } System.out.println(total); } public static void main(String[] args) { ListExample ex = new ListExample(); ex.exampleA(); ex.exampleB(); } } Output: [hi, I, am, making, a, list] Size = 6 [hi, I, made, a, list] Size = 5 39 Each graphical item you add to the scene belongs in a parent node that contains a List of all memebers. Now, that we know what a List is… r let’s describe what the graphical tree system is. Each item in the scene graph is a node. Therefore, the items you add to the scene must be instances of Node class or a subclass of Node. There are two types of Node subclasses: branches and leafs. Branches can have children or not, but leafs cannot have any children. The trees we are talking about are like factor trees. They look like upside down trees. Branches hold together the different leafs. Consider this diagram: Now, let’s write an application that creates this crazy, crazy scene! The nodes are added to Group nodes by adding them to the Group node’s List object Example 1.3 import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.Group; import javafx.stage.Stage; import javafx.scene.image.ImageView; import javafx.scene.text.Text; // for adding text import javafx.scene.shape.*; // imports all classes in shape // including Rectangle, polygon, circle... public class Fun extends Application { public static final int SCENE1_WIDTH = 400; public static final int SCENE1_HEIGHT = 300; public void start(Stage stage) { Group root = setUpRoot(); Scene scene1 = new Scene(root, SCENE1_WIDTH, SCENE1_HEIGHT); stage.setTitle("My Crazy Application!"); stage.setScene(scene1); stage.show(); } public Group setUpRoot() { Group root = new Group(); // we use getChildren method to get the list of child nodes // then we add, remove, or get however we want root.getChildren().add(new Circle(50)); // radius = 50 root.getChildren().add(new Rectangle(100, 200)); // w = 100, h = 200 // now we add a URL (web link) to a picture. // find any picture you want and copy it’s URL instead of // mine if you like. ImageView pupper = new ImageView("http://pulpbits.net/wp- content/uploads/2014/02/brazil-dog-puppies-330x220.jpg"); root.getChildren().add(pupper); return root; } }} If you used my image line, you should see something like So what happened to our circle and rectangle! Well, you see the Nodes are added to the scene in layers in order that you create them. Our picture is covering up our rectangle and circle. Try changing the code so the ImageViewer is added first and you should get the following As you can see the circle ad rectangle are overlapping too much for us to make out both of them. Let’s try moving the circle. No worries, though! We just need to use a different Circle constructor. Circle(double centerX, double centerY, double radius) Change the call to the Constructor of the circle to the following: root.getChildren().add(new Circle(200, 150, 50)); And we get:











