Programming Homework Help

Programming Homework Help. UT Simple PyTorch Tensors 4D Tensor with Random Numbers Program

I’m working on a Python exercise and need support.

Create tensors with Python lists with the following dimensions (shapes): 1, 2×3, 2x2x2. Show the tensors’ shapes.

Create a 4D tensor with random numbers between 0 and 1. Use the relevant tensor function to do so.

Create a 2D tensor with all zeros and another with all ones. Use the relevant tensor function to do so.

Using a 4D tensor and using indexing: show a single scalar; show a single vector; show the first scalar from each vector.

Demonstrate adding a scalar to every scalar in a 3D tensor (using broadcasting).

Demonstrate element-wise dividing a 3D tensor by a vector (using broadcasting).

Demonstrate the use of the item() and tolist() functions to get Python values.

Demonstrate the use of min() and mean() providing the dim= parameter to find the min/mean over a certain dimension.

Combine two 2D tensors so one is “on top” of the other.

Reshape a 2D tensor to a 3D tensor.

Convert a tensor to single-precision floating point (float32), upload to the gpu, perform an arithmetic operation with another tensor, and then download from the gpu. Demonstrate that these steps worked.

Programming Homework Help

Programming Homework Help

Programming Homework Help. INT 499 Ashford University Online Application Development Project

Last week you took on the role of the developer of an application that outputs the data back to the EZTechMovie administrator. As you recall, the development of this program is very urgent and your manager suggested using an agile method of development. As part of this method (SCRUM environment), you are required to take the feedback received from last week and apply that feedback to your code. You will then resubmit it for the next code review meeting. In your initial post, invite the reviewers to complete a second review of your code. Explain how you have improved your code based on the feedback you received. In addition, if you believe that any of the feedback you received last week was incorrect or should not apply, state why you chose not to apply it. Attach a zip file to the post, which must include:

  • The revised version of your C++ program (.cpp file/s)
  • Screen shots of: executed program, functionality information, tests that were run on the program and the outcomes.

Programming Homework Help

Programming Homework Help

Programming Homework Help. IT 306 George Mason Program that Reads in A Data File of Pet Information Exercise

import java.io.*;

public class PetList {

private static final String INPUT_FILE = “./pet_data.csv”;
private static final String OUTPUT_FILE = “./pet_report.txt”;

private static String[] petData;
private static Pet[] pets;
private static int numPets = 0;

public static void main (String[] args) {
retrievePetData();
convertPetDataToPetObjects(petData, pets);
writeOutput();
}

private static void retrievePetData() {
int incrementSize = 5;
petData = new String[incrementSize];

try (BufferedReader br = new BufferedReader(new FileReader(INPUT_FILE))) {
String line;
while ((line = br.readLine()) != null) {
petData[numPets] = line;
numPets++;
if (numPets == petData.length) {
String[] tmpData = new String[petData.length + incrementSize];
for (int idx = 0; idx < petData.length; idx++) {
tmpData[idx] = petData[idx];
}
petData = tmpData;
}
}
br.close();
} catch (Exception e) {
System.out.print(e.getClass().getName() + ” “);
System.out.println(e.getMessage());
}
}

private static void convertPetDataToPetObjects(String [] petData, Pet [] pets) {

}

private static void writeOutput () {
try {
PrintWriter pw = new PrintWriter(new FileOutputStream(OUTPUT_FILE));
writePetObjects(pw);
writePetStatistics(pw);
pw.close();
} catch (Exception e) {
System.out.print(e.getClass().getName() + ” “);
System.out.println(e.getMessage());
}
}

private static void writePetObjects (PrintWriter pw) {
if (pets != null) {
for (Pet aPet: pets) {
if (aPet != null) pw.println(aPet.toString());
}
}
}

private static void writePetStatistics (PrintWriter pw) {
int numberOfCats = 0;
int numberOfDogs = 0;
float averageCatAge = 0.0f;
float averageDogAge = 0.0f;

pw.println(“Number of cats: ” + numberOfCats);
pw.println(“Number of dogs: ” + numberOfDogs);
pw.println(“Average cat age: ” + averageCatAge);
pw.println(“Average dog age: ” + averageDogAge);
}
}

public abstract class Pet

{

}

Programming Homework Help

Programming Homework Help

Programming Homework Help. STU Convert All Characters in A File to Upper Case Code

Find a favorite paragraph of text on the internet (or song lyrics or whatever). You just need a few lines.

Copy and paste the text of the paragraph into a text file and save the file to the hard-drive on your computer.

You can use Notepad or IDLE or some other simple text editor.

Write a program that will open the file containing your paragraph, read the file, convert the text to all upper case and write the text to a new file.

You will need to figure out where Python looks for files by default – or specify the full path name to your file.

Programming Homework Help

Programming Homework Help

Programming Homework Help. Morgan State University Java Coding Five Problems

Hello I am seeking help with these five java problems. My code is all over the place and I do not know where I am going wrong. May you please code these problems with java and provide notes explaining what each each line is doing. The txt files are not provided however may you please still write the code as if they were provided.

Programming Homework Help

Programming Homework Help

Programming Homework Help. CIS 22B De Anza College Pure Virtual Function Encrypted Message Lab Report

Objective:

Design a program that uses abstract classes. To be completed by same group as last lab.

Assignment:

In cryptography, encryption is the process of encoding a message or information in such a way that only authorized parties can access it. In this lab you will write a program to decode a message that has been encrypted.

Detailed specifications:

Define three classes. Each one should be in a separate file. You can choose to define the class and its functions inline, all in a header file, or have a .h and .cpp file for each class.

  • Abstract base class with the following:
    • A variable to hold an encrypted message. This variable should be a string which is initialized in the constructor.
    • A status variable that will tell whether the message was loaded successfully.
    • A constructor that receives one parameter: a string variable with a file name and uploads its content to the string variable that is supposed to store it.
    • A pure virtual function called decode. This function will be defined in derived classes.
    • A function that prints the message on the screen
  • A derived class that implements a version of decode according to the following algorithm:
    • input character: abcdefghijklmnopqrstuvwxyz
    • decoded character: iztohndbeqrkglmacsvwfuypjx
    • That means each ‘a’ in the input text should be replaced with an ‘i’, each ‘b’ with a ‘z’ and so forth.
  • A second derived class that implements a version of decode accordingalgorithm known as “rotational cypher”. In this encryption method, a key is added to each letter of the original text. For example:
    Cleartext:        A    P    P    L    E
    Key:              4    4    4    4    4
    Ciphertext:       E    T    T    P    I

    In order to decode, you need to subtract 4.

I will provide a program that tests your classes.

The output should be printed on the screen. Attach the output of your program as a comment at the end of your source code.

Turn in:

Encrypted.h, CypherA.h and CypherB.h (corresponding .cpp files optional). Only one person in the group has to turn in the assignment for the group. A screenshot of your tests.

ALL files should have the group # and the names of group members.

Programming Homework Help

Programming Homework Help

Programming Homework Help. CSCI 3120 C Programming Mining Blocks Project

Problem Statement
Extend your program from Assignment 2 (or the provided solution) to make your miner multithreaded so
that it spawns multiple threads when searching for the nonce. Your program must be compiled to an
executable called miner. The program will read in five events. The events are the same events as in
Assignment 2, except that the mine event will now take one parameter, specifying the number of threads
that should be created to search for the nonce.
1 This background description assumes that you have read and understood the background for Assignment 1 and 2.
Please see the Problem Statement in Assignment 1 and Assignment 2 for a description of the events.
On a mine event, your program must do the following:
1. Construct the block in the same manner as in Assignment 2.
2. When searching for the nonce, your program must spawn the specified number of threads and
each thread will search a portion of the search space (see Processing Section for details).
3. Once the nonce is found, the threads should be destroyed and the rest of the computation proceeds as in Assignment 2.
Note: the changes to the simulator in Assignment 3 deal with how the nonce is selected. All other functionality remains the same.

Programming Homework Help

Programming Homework Help

Programming Homework Help. CSU Global Immersive Android Mobile Application Technologies Paper

Throughout the course, you have been exposed to a number of technologies that can be utilized in order to create an immersive Android mobile application. For your Portfolio Project, you will identify a prospective idea for development as an Android mobile application. You will create the interface for the application and identify features for the application. You do not need to full implement the application, but instead you should provide a 4-5 page (not including title and reference pages) analysis of the required technologies that would need to be included for your Android Application.

Programming Homework Help

Programming Homework Help

Programming Homework Help. CISC 300 University of South Florida Wk 4 Create a Program Code C Programming Task

“tracks.dat” is available in the ~tburger/class directory• Your program is to read the provided data file and write the contentsto standard output in a readable format.• Each record is to be read in a single read operation.• The information in the “Misc” field is to be extracted using shifts andmasks.• The file contains 4 data records – you must read and print all of them.• Submit your program along with the output from your program 

https://drive.google.com/file/d/1ntWmC7zPgcrzU8Fkv…

Programming Homework Help