
Write a function extractData in your shell script wparser.bash. This function will perform the core processing logic associated with each file. The main script will just iteratively call this function with different files as its argument.
This function should accept a data file as its argument. This function should then produce an output of the following format that that contains only the temperature and wind information from the sensors along with a header. (see image; truncated for brevity). A clean format of data like this form can be used by various
The script is basically only including the year, month, day and hour information, followed by the temperature reported by each temperature sensor, and wind speed from wind sensors at that time. If a temperature sensor’s reading is NOINF or MISSED SYNC STEP in the original data file for that particular time, the script must instead output the previous readout for that temperature sensor.
For simplicity, you can assume that the first readout for all the temperature sensors in a given day does not have any issues. The output should follow the same order of time as in the original data file.
The script also translates the wind speed direction codes (which runs from 0 through 7) to appropriate mnemonics, i.e. (N,NE,E,SE,S,SW,W,NW) respectively.
Immediately following the previous output produced from a data file, the script (aka inside the function to be specific) should produce the statistics as to what was the maximum as well as the minimum temperature and wind speed that was reported for a given hour. The format is given below. For this report, it is important to ignore the temperature sensors that it was not able to read data for that hour and consider only the sensors that were functioning and produced a valid reading in that hour.



Step by stepSolved in 2 steps with 1 images

- Create a new file cart.html You must get and set the data on the web page by using document.getElementById( ). Each HTML element on the web page already has an id so it is easy. No need for a loop to go through the list of products, there is only 2 products and the info is hard coded on the web page. You must write the code for function cartTotal().arrow_forwardPlease write a 2.7 Python script/function that will find a specific file/check if it exists through multiple folders that contain multiple folders and files that contain multiple folders and files and some are also zipped as well. Once it is found/exists, move that file into a different directory. If there is no such file in any of these folders then return pass. Please provide a folder structure picture as well. Please provide a full commented solution with an explanation and screenshot of code and output.arrow_forwardWrite a function extractData in your shell script wparser.bash. This function will perform the core processing logic associated with each file. The main script will just iteratively call this function with different files as its argument. USE grep, awk, sed, find This function should accept a data file as its argument. This function should then produce an output of the following format that that contains only the temperature and wind information from the sensors along with a header. (see image; truncated for brevity). A clean format of data like this form can be used by various information processing systems. The script is basically only including the year, month, day and hour information, followed by the temperature reported by each temperature sensor, and wind speed from wind sensors at that time. If a temperature sensor’s reading is NOINF or MISSED SYNC STEP in the original data file for that particular time, the script must instead output the previous readout for that…arrow_forward
- Write a Java program that reads from a URL and searches for a given word in the URL and creates a statistic file as an output. The statistic file needs to include some information from the URL. URL address Number of words in the URL page Number of repetitions for a given word displays the number of times the word appears. You need to have two functions, one for reading from the URL and the other function for searching the word.arrow_forwardWrite a function in python named "read_words" that declares a parameter for a filename and returns a collection of unique words in the file. Even though words.txt contains a single word per line, you should not assume that this is true of every file. For example, if the line is a sentence, you should split the line into individual words before storing each word in your collection. Handle any errors that occur by printing a detailed error message. Hint: the Python set works like Java's HashSet.arrow_forwardTrying to write a bash script off of a CSV file. The script will be given a single argument. If the argument is a year, the program should report the country with the highest incidence and the corresponding incidence value for that year. On the other hand, if the argument is a country, the program should report the year with the highest incidence and the corresponding incidence value. For example if ./script.sh Afghanistan is given the output will show that the year 2018 had the highest births with a skilled personnel at 58.8% or if ./script.sh 2018 is given the output will show that the country Albania had the highest births with a skilled personnel at 99.8% The CSV file looks as follows Afghanistan 2018 Births attended by skilled health personnel (%) 58.8 Afghanistan 2017 Births attended by skilled health personnel (%) 53.4 Afghanistan 2015 Births attended by skilled health personnel (%) 50.5 Afghanistan 2014 Births attended by skilled health personnel (%) 45.2…arrow_forward
- Please answer the following Bash question, please show your output as well. 1. Write a Bash function named ‘Generate-ID' that generates all possible UGA student id start with 900. The output should be saved into a file named studentID.csv. 2. Write a Bash function named ‘Find_word’ that read wordlist.txt file to find all words end with “ing” and output these words to WordEndIng.csv. 3. The auth.log file (path: /var/log/auth.log) and syslog file (path: /var/log/syslog) are two of the most important log files in Linux. Generally, adversaries target these files so that system administrators couldn’t track what attackers are doing. Write a function named get-linuxlog() that reads all the above two files and stores them into a file named linuxeventlog.txt (Hint use the ‘cat’ command)arrow_forwardWrite a main function in python that calls your functions to create the CSV file containing all of the anagrams using "words.txt" as the original input file. After you have written the file, print all of the anagrams that only match a single word to standard output.arrow_forwardJust fix and organize the code below. Show screenshot code running! Write a menu-driven script that consolidates your code in 1 – 5. Define a function running each of them. However, you need to use a dictionary-based Jump Table to implement the menu Sample run: Assignment 5 Testing Script 1 Temperature Conversion and Mapping 2 Filtering Grades 3 Reducing Strings 4 Exit Just fix and organize the code below # our function temp_conversion def convert(): for i in range(len(cel)): cel[i] = (9 * cel[i] / 5 + 32) cel = [] number = int(input("How many elements you want to covert? : ")) for i in range(0, number): number = int(input("Enter the temperature in Celcius : ")) cel.append(number) print("The temperature in Celcius are", cel, "degrees") print("The temperature in Fahrenheit are", cel, "degrees") # our function filtering_grades def filtering_grades(): lst1 = [] lst2 = [] n = int(input("Enter number of elements : ")) for i in range(0, n):…arrow_forward
- Consider the data contained in the text file data1.txt. The first row of this file contains the column names. The remaining rows have one number for each column. The numbers are separated by a tab character. You can work in your command window. No need to create a matlab file for this question. Download the data file. Use importdata() function to load data into Matlab. What is the average of the numbers contained in the third column of this data? Data1: col1 col2 col3 col4 col5 906 552 743 348 45 676 229 425 661 558 469 642 430 384 773 913 485 125 628 312 105 152 25 22 179 746 782 291 911 339 737 101 318 801 211 562 295 654 746 511 185 238 957 814 907 598 531 936 384 629 300 92 458 618 102 135 406 241 576 391 213 105 764 531 55 895 113 760 276 502 72 785 741 249 432 243 292 744 452 998 54 604 106 228 812 442 965 682 805 486 14 433 464 987 895 898 695 213 30 138 197 759 99 536 391 94 433 824 88 928 308 656 176 803 918 457 110 164 990 714 102 934 666 67 619 996 188 895 940 344 333 267…arrow_forwardPlease answer properly with output screenshot must Where is the error in this code? from telethon.sync import TelegramClientfrom telethon.tl.functions.messages import GetDialogsRequestfrom telethon.tl.types import InputPeerEmptyimport os, sysimport configparserimport csvimport time re="\033[1;31m"gr="\033[1;32m"cy="\033[1;36m" def banner():os.system('clear')print("ok") cpass = configparser.RawConfigParser()cpass.read('config.data') try: api_id = cpass['cred']['id'] api_hash = cpass['cred']['hash'] phone = cpass['cred']['phone'] client = TelegramClient(phone, api_id, api_hash)except KeyError: os.system('clear') banner() print(re+"[!] run python3 setup.py first !!\n") sys.exit(1) client.connect()if not client.is_user_authorized(): client.send_code_request(phone) os.system('clear') banner() client.sign_in(phone, input(gr+'[+] Enter the code: '+re))os.system('clear')banner()chats = []last_date = Nonechunk_size = 200groups=[]result =…arrow_forwardWrite a script file to play a simple number guessing game as follows. The script should generatea random integer in the range 1, 2, 3, . . ., 14, 15. It should provide for the player to makerepeated guesses of the number, and it should indicate if the player has won or give the player ahint after each wrong guess. The responses and hints are as follows:• “You won” and then stop the game.• “Very close” if the guess is within 1 of the correct number.• “Getting close” if the guess is within 2 or 3 of the correct number.• “Not close” if the guess is not within 3 of the correct number.arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education





