Category: Computer science and IT assignments

Check/ improve simple Python Code

Creating function for AWS API Gateway endpoint:

import json
import random

def lambda_handler(event, context):
    # TODO implement
    Cheeses = [“fromage”, “”, “formaggio”, “ost”]
   
    which_one = range(0, len(Cheeses), 1)
    return {
        ‘statusCode’: 200,
        ‘body’: json.dumps(Cheeses[which_one]), “headers”: {},
“isbase64Encoded”; “false” }

Check/ improve simple Python Code

Creating function for AWS API Gateway endpoint:

import json
import random

def lambda_handler(event, context):
    # TODO implement
    Cheeses = [“fromage”, “”, “formaggio”, “ost”]
   
    which_one = range(0, len(Cheeses), 1)
    return {
        ‘statusCode’: 200,
        ‘body’: json.dumps(Cheeses[which_one]), “headers”: {},
“isbase64Encoded”; “false” }

web scraping

Scrape university websites (below) to create a data set of professors working there (name, date of birth, year when phD obtained, University where PhD was obtained).

https://unimap.unipi.it/cercapersone/cercapersone.php

https://www.docenti.unina.it/#!/search

http://www.uniroma3.it/persone/ZzRsSHkrcGZPa25vVG5OdzZqeXhqOUx1TVE0cXhUdlcvM3o1blJVb1FzWT0=/

(python file)

C++ Programming for Financial Engineering

Need someone so take 10 homeworks and 10 quizzes in C++ Programming course offered by Quant Net. Please understand that I am a full time student and dont have money so please quote based on my affordability. Also please only contact if you have done any Quant Net courses, C++ programming for financial engineering course or have a good idea what the quizzes would be like. I have content slides that you can review before you appear for each quiz. Each homework has around 7 questions. Each quiz has to be done in 10 minutes and you can do them at your own pace.

Since each quiz is only 10 minutes long, and anyone with firm command over C++ Programming can easily do them with a little review of slides, and anyone with such command can easily complete each homework in just a few minutes, I have quoted the price above. Also please understand that I am a full time student and believe me it is impossible for me to arrange more money than the quoted price. So please only bid if you can do it in the above specified price and if you have firm command over C++ Programming.

Coding a B+ Tree

Implement a DBTable and the BTree classes. The DBTable class implements the basic parts of a database table and the BTree class implements a B+Tree. The DBTable must use the B+Tree to find rows in the table. Every DBTable method will use Btree. The assignment also comes with an outline of methods to implement in the two classes. All done in java code.

Assignment 1: Boing

hi ! this is a relatively basic java based programming assignment that is due in 14 hours. the code you write does not have to be very professional or well thought out as long as the main objective of the assignment is met. if you could try and make it somewhat simple and straight to the point please, not unnecessarily complex. please read attached the archambault pdf for what the assignment wants, Thanks!

complete 2 methods to evaluate arithmetic expressions in java

The assignment is to complete 2 methods:

makeVariableLists – This method populates the vars and arrays lists with Variable and Array objects, respectively, for the simple variable and arrays that appear in the expression.

evaluate – This method evaluates the expression.

Everything else except for these 2 methods is already implemented and there is no need to modify it. The project includes all helper methods required, as well as 2 test files to make sure the program works. The details are in the PDF, please read carefully. I think using stacks is one of the recommended methods to go about this, in which case the stack class is already provided. If possible, please make comments within the code, thank you.

Graph Algorithms

I have a project that I need to be implemented in C. It requires an implementation of a given priority queue specification and then using that to implement 4 algorithms: BFS, Bellman-Ford, Dijkstra’s and A*.

Project files have been given and it just requires the interfaces in pq.h and sp_algorithms.h to be implemented and ap.c to have its functionality completed. There are additional tests that need to pass to check the code works well (Provided).

FULL Description:

Intended Learning Outcomes (ILOs)
Upon successful completion of this lab, you will be able to

explain the various shortest path algorithms and their advantages/disadvantages

use existing data structures in your algorithms

combine existing data structures to get new functionality

write C code for the above concepts

use a test-driven development approach for algorithms and data structures

Assignment
Summary: Implement the interfaces specified in pq.h, sp_algorithms.h , and the functionality described in ap.c.

General Notes
Unless otherwise specified, its fine to over-estimate required array sizes to avoid dynamic re-allocation. For example, the queue required for BFS can be implemented as array with a size of num_nodes. This is the worst-case space required, but in most cases, significantly less nodes will be required, such that a dynamically growing queue would be more efficient (but also more complicated to implement1)

Try to program in a modular way. Do not duplicate functionality, but move it to own functions. Also, do not artificially inline unrelated functionality (for example, priority queue operations should not go inline into Dijkstras algorithm!). This only makes the algorithms complicated to read, and does not even bring efficiency advantages, as modern compilers are very good at automatically inlining themselves.

The assignment comes with a test-generator , which will test your data-structures and algorithms on randomly generated input data. Use this to test each module in isolation, before you build modules depending on it! Its much simpler to debug Dijkstras algorithms if you know that your priority queue is correct!

Also, feel free to modify the tests, e.g., to generate additional output useful for debugging your problem, or to pin down a particular bug. You can use the msg and assertmsg macros, that accept printf format strings.

Have a look at for the tests that we will run on your submission!

Min-Heaps
The elements of the heap will be nodes (node_t = unsigned integer). The priorities are given by an array D from nodes to weights (see weights.h for the available operations on weights)..

You have already seen a heap data structure, implemented by a tree encoded into an array. In this assignment, you will extend this idea to support an efficient operation to decrease the priority of a node that is already on the heap, as well as an efficient check whether a node is on the heap. For this, you maintain an additional mapping from nodes to heap-indexes. After decreasing a nodes priority, you use its heap-index to start a sift-up operation.

The file specifies the interface, including the required complexities for most operations. The file provides some suggestions how to implement the operations. You are free to follow them, or do your own implementation from scratch.

Shortest Paths Algorithms
The file specifies basic graph operations. The file provides an interface how to return results for single-source shortest path algorithms. You have to implement:

BFS, that ignores the weights and returns paths with minimal number of edges.

Bellman-Ford. First, dont care about negative weight cycles. Once you have got the algorithm correct for this case, you can try to correctly handle negative weight cycles: If, after |V|1 steps, you can still relax edges, set their target nodes distance to . Continue (for at most |V|1 more steps) until all nodes reachable via negative weight cycles have distance . However, do not update the predecessor map in this second phase!

Dijkstra. This will need a working priority queue implementation.

A*. We strongly recommend to implement this after Dijkstra! You can assume a monotone heuristics, such that it will be very similar to Dijkstra.

The Airport Example
In this example you will work on a graph generated from the openflight database, that encodes connections between airports on the world.

Your task is to implement a (DFS) based algorithm to count the number of airports that can be reached from a given start airport, and to compute shortest routes between two given airports. Use your graph algorithms!

See for the interface, and for a description what to implement. Exactly stick to the output format described there!

Assignment 1: Bash Scripting

QUESTION 2
Write a bash script that monitors in real time the sizes of regular files in a specified folders. The folder name should be provided as an argument when calling the script. The folder must exist in the same working directory where the script is located. Ensure that the script is properly called with an argument. Then monitor the file sizes and log in a separate file the timestamp and the name of the file when its size goes above 4Kbytes. In such a case, archive and backup the file with the timestamp as part of the archives name and replace the file with a new and empty one. Exclude the log file from the monitoring. To test the script, manually create a folder with a mixture of sub-folders and files. When the script is running, open the files in your test folder and be adding content to it to increase the file size and check if your script could monitor the changes. (You are free to automate the testing). Properly comment your code.

QUESTION 3
Write a bash script that automates the creation and deletion of user accounts. The script should accept as input argument, a file containing a list of user names to be created on the system. Enforce that the user provides this input file while executing the script. The script should check if the usernames already exist on the system before creating the accounts. If a user account exit, the script should notify the user and skip that user name to the next one. Make sure to create a home directory as well. When the input list has been exhausted and all the user account created, output the content of /etc/passwd file and /home directory to the terminal for verification. In a next step, the script should ask if user wants to delete the newly created accounts? If yes, the script should delete the accounts including their home directories and output again the content of /etc/passwd file and /home directory for verification. If no, the script should terminate with appropriate message. This script is to be tested/executed as a root user. Properly comment your code.

Move To Front List

Keep it as simple as possible, don’t use extremely complex methods unless absolutely necessary. This assignment is not huge nor extremely complicated. Do not change the method’s signature in any way, just fill in the code under the method’s signature. The only file that should be edited is MoveToFrontList.java, the other files are for reference/testing. Be sure to read the movetofront.html file for complete instructions (there are also comments for each method in the code itself).