legacy_scrapeAll
.py
keyboard_arrow_up
School
Rutgers University *
*We aren’t endorsed by this school
Course
213
Subject
Computer Science
Date
May 2, 2024
Type
py
Pages
23
Uploaded by PrivateDragonMaster1090 on coursehero.com
import json import sys from bs4 import BeautifulSoup import requests as requests from tqdm import tqdm import datetime import operator #http://sis.rutgers.edu/oldsoc/courses.json?
subject=198&semester=12022&campus=NB&level=U #http://sis.rutgers.edu/oldsoc/courses.json?
subject=198&semester=12022&campus=NB,NK,CM&level=U # above works but only gets subject 198 which isn't very useful #http://sis.rutgers.edu/oldsoc/courses.json?
semester=12022&campus=CM&level=U,G #break down api... #base url base_url = "http://sis.rutgers.edu/oldsoc/courses.json" #ALL COURSES ARE 20MB in unzipped form #surprisingly only 871kb gzipped #NEW API ALERT BABYYYY #https://sis.rutgers.edu/soc/api/courses.json?
year=2022&term=9&campus=NB #this does work #split term off #get all courses for new brunswick in one file here lets gooo currentDayList = [] locationList = [] campusList = [] buildingCodeList = [] #get year argument from command line #expecting 4 digit year year = sys.argv[1] #expecting 1 digit term code #7 - summer #9 - fall #0 - winter
#1 - spring term = sys.argv[2] #expecting NB,NK,CM schoolcampus = sys.argv[3] #if unset, use default (figure out from current date) # currCalendarYear = datetime.datetime.now().year # currMonth = datetime.datetime.now().month # currDay = datetime.datetime.now().day #found this from #https://github.com/anxious-engineer/Rutgers-Course-API/blob/
56af65bd17c5ddf512be5bb2a3d28f05c8d50085/DB-PoC/rusoc/api.py month_to_semester_map = { '1' : '1', 1 : '1', '2' : '1', 2 : '1', '3' : '1', 3 : '1', '4' : '1', 4 : '1', '5' : '1', 5 : '1', '6' : '1', 6 : '1', '7' : '7', 7 : '7', '8' : '7', 8 : '7', '9' : '9', 9 : '9', '10' : '9', 10 : '9', '11' : '9', 11 : '9', '12' : '9', 12 : '9', } # if year == "": # #get current school year # year = str(currCalendarYear) # if term == "": # #determine which term it is
# #after jan 15th and before may 2 is spring session # if currMonth >= 1 and currMonth <= 4: # #spring # term = "1" # elif currMonth >= 5 and currMonth <= 8: # #summer # term = "5" # elif currMonth >= 9 and currMonth <= 12: # #fall # term = "9" # if schoolcampus == "": # schoolcampus = "NB" #https://sis.rutgers.edu/soc/?term=92022 #this can convert PH -> to PHARMACY & id:3750 #nameConversion nameConvertUrl = "https://sis.rutgers.edu/soc/?
term="+term+""+year print(nameConvertUrl) # r = requests.get("https://sis.rutgers.edu/soc/?term=92022") r = requests.get(nameConvertUrl) soup = BeautifulSoup(r.content, features="html.parser") jsonDiv = json.loads(soup.find('div', {"id": "initJsonData"}).text) buildingCodes = [d["code"] for d in jsonDiv["buildings"]] buildingNames = [d["name"] for d in jsonDiv["buildings"]] buildingIDs = [d["id"] for d in jsonDiv["buildings"]] def getBuildingID(buildingCodeAbbrev): tempIndex = buildingCodes.index(buildingCodeAbbrev) return { "name": buildingNames[tempIndex], "id": buildingIDs[tempIndex] } #print(dict.keys(jsonDiv)) #print(json.dumps(jsonDiv, indent=2)) #print(json.dumps(jsonDiv['buildings'], indent=2))
#get coords of buildings #for now, import file. later, pull directly from URL buildingLayer = open("fromMap/buildings-parking-layer.json") buildingLayerJson = json.load(buildingLayer) #print(json.dumps(buildingLayerJson, indent=2)) #print(dict.keys(buildingLayerJson)) buildingLayerIndex = [d["id"] for d in buildingLayerJson['features']] def getBuildingGeoData(buildingID): if buildingID in buildingLayerIndex: curr = buildingLayerJson['features']
[buildingLayerIndex.index(buildingID)] return { "geometry": curr['geometry'], "properties": curr['properties'] } else: return #get coords of regions #NOT HELPFUL! # campusLayer = open("fromMap/districts.json") # campusLayerJSON = json.load(campusLayer) # #print(json.dumps(buildingLayerJson, indent=2)) # #print(dict.keys(buildingLayerJson)) # campusLayerIndex = [d["id"] for d in campusLayerJSON['features']] # print(campusLayerIndex) # def getDistrictGeoData(campusID): # campusID = int(campusID) # if campusID in campusLayerIndex: # #print("Campus id:"+str(campusID)) # curr = campusLayerJSON['features']
[campusLayerIndex.index(campusID)] # return { # "geometry": curr['geometry'], # "properties": curr['properties'] # } # else: # return #MAP API ALERT!!! #https://maps.rutgers.edu/#/?click=true&selected=3117 map_base_url = ""
#IMAGE API image_base_url = "https://storage.googleapis.com/rutgers-campus-
map-building-images-prod/" image_end_url = "/00.jpg" #IMPORT NOW DOWNLOAD LATER # coursedataFile = open("fromSIS/courses2.json") # coursedataJSON = json.load(coursedataFile) #download #https://sis.rutgers.edu/soc/api/courses.json?
year=2022&term=9&campus=NB,NK,CM #could look into #https://scheduling.rutgers.edu/scheduling/class-scheduling/
standard-course-periods-0 #this page to help compress the data #since most classes follow the standard course periods listed here, #the abbreviations can be used to express the standard class times #and the full times can be used for the exceptions #Standard Course Periods # 80min Periods
55min Periods
180min Periods # 1
8:30 9:40am
1,2
8:30 11:40am
2*
10:35 1:20pm # 3
12:10 1:20pm
3,4
12:10 3:20pm
4*
2:15 5:00pm # 5
3:50 5:00pm
5,6
3:50 7:00pm
6*
5:55 8:40pm # 7
7:30 8:40pm
Grad Eve
6:00 10:40pm
8*
9:35 10:30pm #Standard period combinations: 2x80min, 2x55min # Monday
Tuesday
Wednesday Thursday
Friday # 1
MTh1 TF1
W1F6
MTh1
TF1 # 2
MTh2 TF2
W2F5
MTh2
TF2 # 3
MTh3 TF3
W3F4
MTh3
TF3 # 4
MW4
TTh4
MW4
TTh4
W3F4
# 5
MW5
TTh5
MW5
TTh5
W2F5 # 6
MW6
TTh6
MW6
TTh6
W1F6 # 7
MW7
TTh7
MW7
TTh7
# 8
MW8
TTh8
MW8
TTh8
# Standard Period Combinations: 3x80min, 3x55min # All meetings should take place in the same room # Monday
Tuesday
Wednesday Thursday
Friday # 1
MWTh1
TWF1 MWTh1 MWTh1
TWF1 # TWF1 # 2
MWTh2
TWF2 MWTh2 MWTh2
TWF2 # TWF2 # 3
MWTh3
TWF3 MWTh3 MWTh3
TWF3 # TWF3 # 4
MWF4 TThF4
MWF4 TThF4 MWF4 # TThF4 # 5
MWF5 TThF5
MWF5 TThF5 MWF5 # TThF5 # 6
MWF6 TThF6
MWF6 TThF6 MWF6 # TThF6 #https://scheduling.rutgers.edu/scheduling/academic-calendar scheduleURL = "https://scheduling.rutgers.edu/scheduling/academic-calendar" sched = requests.get(scheduleURL) schedSoup = BeautifulSoup(sched.content, features="html.parser") #find div.responsive-table__scroll table.pretty-table.responsive-
enabled # schedTable = schedSoup.find_all('div', {"class": "responsive-
table__scroll"}) # print(schedSoup.body.find({"class": "responsive-table"})) #found it! # print(schedSoup.table) #.find('table', {"class": "pretty-table responsive-enabled"}) #this is for new api, which does not support multiple campuses, so I am using old api
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Questions
Subject : Data Structure
Language : C
Topic : Hash Table
Sub Topic :- Pop- Push- Search
Case :
Bluejack Library is one of the popular libraries in the town. This library has more than 50.000 books. Sadly the senior librarian wants to resign and he doesn’t have time to teach the new librarian. Bluejack Library needs a simple program to help the new librarian so he can easily manage and search books. Bluejack Library hires you as a programmer to help them create a program that can help a new librarian find and manage books in this library easily using a C programming language and hashtable data structure. The criteria of the program are:
The program consists of 4 menus, there are:
View Book
Insert Book
Remove Book
Exit
If the user chooses View Book (Menu 1), then:
* If there is no book, then show “There is no book(s) !” message
* Otherwise, the program will show all the book data
If the user chooses Insert Book (Menu 2), then:
- The program will ask user to input the following…
arrow_forward
Subject : Data Structure
Language : C
Topic : Hash Table
Sub Topic :- Pop- Push- Search
Case :
Bluejack Library is one of the popular libraries in the town. This library has more than 50.000 books. Sadly the senior librarian wants to resign and he doesn’t have time to teach the new librarian. Bluejack Library needs a simple program to help the new librarian so he can easily manage and search books. Bluejack Library hires you as a programmer to help them create a program that can help a new librarian find and manage books in this library easily using a C programming language and hashtable data structure. The criteria of the program are:
The program consists of 4 menus, there are:
View Book
Insert Book
Remove Book
Exit
If the user chooses View Book (Menu 1), then:
* If there is no book, then show “There is no book(s) !” message
* Otherwise, the program will show all the book data
If the user chooses Insert Book (Menu 2), then:
- The program will ask user to input the following…
arrow_forward
import pandas as pd
import numpy as np
URL = "https://bit.ly/38zhU5T"
df=pd.read_csv(URL)
note: I think the data should be cleaned before performing the tasks(please include the solution of cleaning the data as well)
arrow_forward
PYTHON
import pandas as pdfrom datetime import dateimport sys
from sklearn.preprocessing import OrdinalEncoder
def series_report( series, is_ordinal=False, is_continuous=False, is_categorical=False): print(f"{series.name}: {series.dtype}") ###### Your code here ###### # Check command line argumentsif len(sys.argv) < 2: print(f"Usage: python3 {sys.argv[0]} <input_file>") exit(1)
# Read in the datadf = pd.read_csv( sys.argv[1], index_col="employee_id")
# Convert strings to dates for dob and deathdf['dob'] = df['dob'].apply(lambda x: date.fromisoformat(x))df['death'] = df['death'].apply(lambda x: date.fromisoformat(x))
# Show the shape of the dataframe(row_count, col_count) = df.shapeprint(f"*** Basics ***")print(f"Rows: {row_count:,}")print(f"Columns: {col_count}")
# Do a report for each columnprint(f"\n*** Columns ***")series_report(df.index, is_ordinal=True)series_report(df["gender"], is_categorical=True)series_report(df["height"], is_ordinal=True,…
arrow_forward
Q3: Normalize the following table, given 1NF, 2NF and BCNF:
8.
Module
Dept
Lecturer
Texts
M1
D1
L1
T1,T2
M2
D1
L1
T1,T3
M3
D1
L2
T4
M4
D2
L3
T1,T5
M5
D2
14
T6
arrow_forward
Estem.org/courses/64525/assignments/9460783?module_item_id=18078917
The following information can help you get started:
• Invitation Details: it boils down to when and where
o When: Time and date
• Where: Address
• Invitee List: Name and email
• Name: First Name, or First Name and Last Name
Email: Email address
. Other considerations:
After you complete your invitation, answer the following questions:
1. What type of data are time, date, and place? How are they different from the other data types on the
invite and guest list?
F4
A
Additional information worth including: dress code, directions, gifting, how to contact you.
. How will you know who is showing up? RSVP?
. Is there a theme to your invitation/design?
x
F5
%
F6
F7
DELL
F8
F9
ROMNA
F10
F11
PrtScr
arrow_forward
Convert this Python script to a MATLAB script.
Hint: Use the matlab-python-cheatsheet.
End all assignment statements with a semi-colon to suppress output to screen.
Include the key word end at the end of your function.
You should try developing in MATLAB and not the quiz server.
def make_list(start, step, stop):
Creates a list - first element is start, last element is stop, each element value increases by step.
Parameters:
start - int - first element in list
step - int - value to increment each element by
stop - int - last element in list
Returns:
list of ints
return list(range(start, stop + 1, step))
For example:
Test
Result
disp(all(make_list(1, 2, 11)== [1 3 5 7 9 11]))
1
disp(all(make_list(10, -2, -10)
== [10 8 6 4 2 0 -2 -4 -6 -8 -10])) 1
arrow_forward
Consider possible optionalities for authors writing books.
arrow_forward
True or False: A data preprocessing module is whereextraction begins for a biometric system.
arrow_forward
Subject Name: Python
Download dataset from:
https://www.mediafire.com/file/zaojfoofemzc2dj/air_quality.csv/file
Question; Tasks:
Task
• Load the required dataset (air_qaulity.csv) into your python file and explore your data
• Create a pivot table that shows the maximum value of emission for each city and fill null value if any
withzero.
• Create a new data frame that contains the data of 'London' city and explore your data.
• Set the appropriate data type for the column datatime and make it as index.
• Use resample () to show the weekly total value of emission that produced at London city.
Finally, create a clear bar chart that shows the result of tasks
Pythons Code:
Use the appropriate python commands to implement the following tasks and show the result.
Please add the task question as comment before the code.
It is not allowed to do manual changes into the given dataset.
Your code should be clear, clean and in the same order of the tasks.
arrow_forward
Safe Datalog Rule: A Datalog rule is of the form:p :- q1, ..., qn. where n>0 and p is a positive atomic formula and q1, ..., and qn are positive or negative atomic formulas. A positive atomic formula is of the form:r(x1, ..., xm) and a negative atomic formulas of the form:not r(x1, ..., xm) where m>0 and r is a relation name and x1 , ..., xm are either numbers or variables. Relation names and variables are made up of alphabetic letters or digits and start with a lower-case alphabetic letter. Even though the variables are made up of lower and upper-case letters, these should be considered case-insensitive. For example, cno, CNO, cNO, etc all should be treated as the same variable.
Some examples of Datalog rules are given below:
ancestor(x1, y1) :- parent(x1, y1). teaches(tno,cno) :- faculty(tno), course(cno), assigned(tno,cno). p(x,y) :- q(2,x), r(u,45,z), s(a,b,22). p(x,y,z) :- q(x), not r(y,20), s(x,z). A Datalog rule is considered “Safe” if all variables that appear to the left…
arrow_forward
Use Python Code
Your task is : Visualization of confirmed cases of COVID-19 by country . (Use pandas to read the data table csv. Example df = pd.read_csv('COVID19.csv' ) then make a visualization using that csv table)
Province/State
Country
Lat
Long
########
########
########
########
########
########
########
########
########
########
2/1/2020
2/2/2020
2/3/2020
2/4/2020
2/5/2020
2/6/2020
2/7/2020
2/8/2020
2/9/2020
########
########
########
########
########
########
########
########
########
########
########
########
########
########
########
########
########
########
########
########
3/1/2020
3/2/2020
3/3/2020
3/4/2020
3/5/2020
3/6/2020
3/7/2020
3/8/2020
3/9/2020
########
########
########
########
########
########
########
########
########
########
########
########
########
########
########
########
########
########
########
########
########
########
4/1/2020
4/2/2020
4/3/2020
4/4/2020
4/5/2020
4/6/2020
4/7/2020
Afghanistan
33
65
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0…
arrow_forward
Sample input file: (Assume all names and IDs in the list are unique and must stay unique.)
Introduction to Computer Programming Fundamentals CSCI 1 MBA 315 John Adams 111223333 100 87 93 90 90 89 91 Willy Smith Jr. 222114444 90 73 67 77 70 80 90 Phil Jordan 777886666 100 80 70 50 -60 90 100
Sample output file format: (Final report)
Course Name: Introduction to Computer Programming Fundamentals Course ID: CSCI 1 Class Location: MBA 315 Name ID Average Grade Adams, John 111-22-3333 91.5 A Smith Jr., Willy 222-11-4444 87.0 B Jordan, Phil 777-88-6666 -1 I
Student list print format to the monitor:
Name Average Grade Adams, John 91.5 A Smith Jr., Will 87.0 B Jordan, Phil -1 I
Student's detail format to the monitor:
Name: Adams, John ID: 111223333 Quiz Score: 100.00 Test Scores: 87.00 93.00 90.00 90.00 89.00 91.00 Average: 91.54 Letter Grade: A
Error messagesBad file name: Failed to open file.File with no data: Empty file.Adding student Error Adams is on the list, duplicated names are not…
arrow_forward
remove the value user inputted only not the key
example
Firstname [firstname]: John
Middlename [middlename]: George
Lastname [lastname]: Doe
A for ADD
D for DELETE
Any key for END
when enter 'D'
lastname
Firstname [firstname]: John
Middlename [middlename]: George
Lastname [lastname]:
A for ADD
D for DELETE
Any key for END
only the inputted will be remove not together the lastname
names = {"firstname":"","middlename":"","lastname":""}
choice = "A"while choice == "A" or choice == "D":print("\n\t A for ADD\n\t D for DELETE\n\t Any key for END")choice = input("\n\t Your choice: ")for k,v in names.items():print("\n\t "+k.capitalize()+" ["+k+"] : "+v)if choice == "A":key = input("\n\t Enter key: ")value = input("\n\t Enter value: ")names.update({key:value})for k,v in names.items():print("\n\t "+k.capitalize()+" ["+k+"] : "+v)elif choice == "D":delete_key = input("\n\t Enter key: ")names.pop(delete_key)for k,v in names.items():print("\n\t "+k.capitalize()+" ["+k+"] : "+v)else:print("\n\t…
arrow_forward
4:04
l LTE
4:04
i LTE
DB Quiz No.5 (12:30@ULJI selga)
DB Quiz No.5 (12:30@ouI selga)
CREATE TABLE Institution (name
VARCHAR(50),country VARCHAR(50).year
CREATE TABLE HighDegree
(professorID INT REFERENCES
Professor(ID).projectID INT REFERENCES
Project(ID),schoolName
VARCHAR(50),institutionName
VARCHAR(50), FOREIGN KEY
(schoolName,institutionName)
REFERENCES
School(name.,insitutionName), PRIMARY
KEY (professorID, studentID, schoolName,
institutionName);
O Number
INT,
(name, country):
PRIMARY KEY
O
Name and Num
WA
The following is an instance of the relation:
CREATE TABLE Author (researcherlD INT
REFERENCES Researcher(ID),.paperID INT
REFERENCES Paper(ID).PRIMARY KEY
(researcherlD, paperID));
O Name
Based on the above, indicate for each of the
following sets of attributes whether it is a
key for Articles Table?
CREATE TABLE PartOf (professorID INT
REFERENCES Professor(ID), studentID INT
REFERENCES Researcher(ID),PRIMARY
KEY (professorID, projectID);
Indicate which one of the following…
arrow_forward
fix python code
def updateDeleteTask(request,taskID): if "Update" in request.POST: return HttpResponse(f"Update Task with ID={taskID}") if "Delete" in request.POST: return HttpResponse(f"Delete Task with ID={taskID}") else: return HttpResponse("Invalid")
arrow_forward
A JSP file contains one JSP scriptlet and one JSP expression, both of which are executed.
If a local variable specified in the scriptlet is defined in the scriptlet, it can still be used in the JSP expression.
Assume that the JSP expression will be positioned directly behind the scriptlet.
Is this correct or incorrect?
arrow_forward
SUPPLIER
PRODUCT
ProductCode
ProductnName
unitPrice
SupCode
supCode
(Number, 3)
SupName
(text, 20)
АВC LLC
(Number, 10)
[Char(10)]
(>0)
1111111
Calculator
10
111
111
2222222
Notebook
2.5
777
222
ХҮX LLC
3333333
Book-AI
20
222
3333
PQR LLC
4444444
Pen
-2.0
222
222
AXL LLC
5555555
Pencil
.500
111
Eraser
.500
222
arrow_forward
Explain how data binding can be implemented in popular front-end JavaScript frameworks like Angular, React, and Vue.
arrow_forward
Dont copy.
arrow_forward
Write a script or a program that reads a text file containing a TF-IDF weights matrix defined in milestone
4, and two additional parameters that are documents' identifiers. Your program should return the cosine
similarity value of those two documents.
sample command to run: python cosine_similarity.py D1 D2
sample output: 0.6 (this is just a number)
arrow_forward
Mona was developing a new program that could read a five-field CSV file. 5 parallel arrays were built by Shed to store data while looking for records. The number of fields per entry will certainly change as a result of the data from the csv files, but Mona thinks this will be simple to handle and will update her code accordingly. Why do you think the design of this code was good or bad?
arrow_forward
Load the given data set into Google Colab python
1. In USD, find the average salary of Data Scientists as well as the standard deviation.
2. List each unique Job Title
3. For each unique Job Title, find their average salary (USD) and standard deviations.
https://uc-bcf.instructure.com/courses/28339/files/5680123?verifier=fXym8nGyMe7CmvKYy7QmRDfcunF4DZwhuqakH1rL&wrap=1
arrow_forward
Explore the concept of "binary executables" and "dynamic link libraries (DLLs)" in software, and explain their functions.
arrow_forward
In a JSP file, there is one JSP scriptlet and one JSP expression, which are both executed. It is still possible to utilize a local variable defined in the scriptlet in the JSP expression if it is defined in the scriptlet. Take it for granted that the JSP expression will be located immediately after the scriptlet. Is this true or false?
arrow_forward
Cooper College maintains a master file of students and credits earned. Each semester the master is updated with a transaction file that contains credits earned during the semester. Each file is sorted in Student ID number order.
start Declarations num masterID string masterName num masterCredits num transID num transCredits
string bothDone = "N" num HIGH_VALUE = 999999 InputFile master InputFile trans OutputFile newMaster getReady() while bothDone = "N" detailLoop() endwhile allDone()stop
getReady() open master "studentFile.dat" open trans "semesterCredits.dat" open newMaster "updatedStudentFile.dat" readMaster() readTrans() checkBoth()return
readMaster() input masterID, masterName, masterCredits from master if eof then masterID = HIGH_VALUE endifreturn
readTrans() input transID, transCredits from trans if eof then transID = HIGH_VALUE endifreturn
checkBoth() if masterID =…
arrow_forward
Hi,
I am looking for some help to solve this question. I cannot figure out how to solve it and the code below is all I have.
Please be advised I am using PostgreSQL. Thus, I must use LANGUAGE PLPGSLQ as that is what the professor is looking for.
Thank you for your help.
Code
CREATE TABLE instructor_course_nums (ID VARCHAR(25), name VARCHAR(25), tot_courses VARCHAR(25));
CREATE TEMPORARY TABLE instructor_course_nums (ID VARCHAR(5),name VARCHAR(20),tot_courses INTEGER);
CREATE OR REPLACE PROCEDURE Moreno_03_insCourseNumsProc(INOUT i_ID VARCHAR(5))LANGUAGE PLPGSQLAS$$
arrow_forward
Write SRS document as per IEEE Std 830-1998 of your assigned semester project. ( Airline Ticket Reservation System )
The following issues shall be addressed by the SRS writer:
Functionality
External Interface
Performance
Quality Attributes
Design constraints imposed on implementation
arrow_forward
Explore the concept of data binding expressions in ASP.NET and provide examples of their usage in web applications.
arrow_forward
Solve ADBMS Question
arrow_forward
Q: Change this code from Matlab to Phython:
2
clear
3
data
load ('ex2data2.txt');
x = data (:, [1, 2]) ; y =
plotData (X, y):
6 hold on;
xlabel ('Microchip Test l')
ylabel ('Microchip Test 2')
legend ('y = 1', 'y = 0')
4
data (:, 3);
8
9
%3D
10
hold off;
mapFeature (X (:, 1), x (:, 2));
initial_theta =
11
X =
zeros (size (X, 2), 1);
13
lambda = 1;
O H N3
arrow_forward
2. The table below indicates the outcome of an election conducted to select a president for the
Computer Science and Information Technology Students Association (CSITSA). Use the table
below to answer the question that follows.
Index Number
Total Votes
Candidate
UE20001318
201
Linda
Nana-Adjei
UE20004518
87
UE20002718
309
Lena
Mavis
UE20002718
105
Raphael
UE20008018
201
Construct a linked list ordered in descending order of votes using a candidate's name as the
node data and index number as the address.
COMP 203 - Data 3tructures and Algorithms
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning
Related Questions
- Subject : Data Structure Language : C Topic : Hash Table Sub Topic :- Pop- Push- Search Case : Bluejack Library is one of the popular libraries in the town. This library has more than 50.000 books. Sadly the senior librarian wants to resign and he doesn’t have time to teach the new librarian. Bluejack Library needs a simple program to help the new librarian so he can easily manage and search books. Bluejack Library hires you as a programmer to help them create a program that can help a new librarian find and manage books in this library easily using a C programming language and hashtable data structure. The criteria of the program are: The program consists of 4 menus, there are: View Book Insert Book Remove Book Exit If the user chooses View Book (Menu 1), then: * If there is no book, then show “There is no book(s) !” message * Otherwise, the program will show all the book data If the user chooses Insert Book (Menu 2), then: - The program will ask user to input the following…arrow_forwardSubject : Data Structure Language : C Topic : Hash Table Sub Topic :- Pop- Push- Search Case : Bluejack Library is one of the popular libraries in the town. This library has more than 50.000 books. Sadly the senior librarian wants to resign and he doesn’t have time to teach the new librarian. Bluejack Library needs a simple program to help the new librarian so he can easily manage and search books. Bluejack Library hires you as a programmer to help them create a program that can help a new librarian find and manage books in this library easily using a C programming language and hashtable data structure. The criteria of the program are: The program consists of 4 menus, there are: View Book Insert Book Remove Book Exit If the user chooses View Book (Menu 1), then: * If there is no book, then show “There is no book(s) !” message * Otherwise, the program will show all the book data If the user chooses Insert Book (Menu 2), then: - The program will ask user to input the following…arrow_forwardimport pandas as pd import numpy as np URL = "https://bit.ly/38zhU5T" df=pd.read_csv(URL) note: I think the data should be cleaned before performing the tasks(please include the solution of cleaning the data as well)arrow_forward
- PYTHON import pandas as pdfrom datetime import dateimport sys from sklearn.preprocessing import OrdinalEncoder def series_report( series, is_ordinal=False, is_continuous=False, is_categorical=False): print(f"{series.name}: {series.dtype}") ###### Your code here ###### # Check command line argumentsif len(sys.argv) < 2: print(f"Usage: python3 {sys.argv[0]} <input_file>") exit(1) # Read in the datadf = pd.read_csv( sys.argv[1], index_col="employee_id") # Convert strings to dates for dob and deathdf['dob'] = df['dob'].apply(lambda x: date.fromisoformat(x))df['death'] = df['death'].apply(lambda x: date.fromisoformat(x)) # Show the shape of the dataframe(row_count, col_count) = df.shapeprint(f"*** Basics ***")print(f"Rows: {row_count:,}")print(f"Columns: {col_count}") # Do a report for each columnprint(f"\n*** Columns ***")series_report(df.index, is_ordinal=True)series_report(df["gender"], is_categorical=True)series_report(df["height"], is_ordinal=True,…arrow_forwardQ3: Normalize the following table, given 1NF, 2NF and BCNF: 8. Module Dept Lecturer Texts M1 D1 L1 T1,T2 M2 D1 L1 T1,T3 M3 D1 L2 T4 M4 D2 L3 T1,T5 M5 D2 14 T6arrow_forwardEstem.org/courses/64525/assignments/9460783?module_item_id=18078917 The following information can help you get started: • Invitation Details: it boils down to when and where o When: Time and date • Where: Address • Invitee List: Name and email • Name: First Name, or First Name and Last Name Email: Email address . Other considerations: After you complete your invitation, answer the following questions: 1. What type of data are time, date, and place? How are they different from the other data types on the invite and guest list? F4 A Additional information worth including: dress code, directions, gifting, how to contact you. . How will you know who is showing up? RSVP? . Is there a theme to your invitation/design? x F5 % F6 F7 DELL F8 F9 ROMNA F10 F11 PrtScrarrow_forward
- Convert this Python script to a MATLAB script. Hint: Use the matlab-python-cheatsheet. End all assignment statements with a semi-colon to suppress output to screen. Include the key word end at the end of your function. You should try developing in MATLAB and not the quiz server. def make_list(start, step, stop): Creates a list - first element is start, last element is stop, each element value increases by step. Parameters: start - int - first element in list step - int - value to increment each element by stop - int - last element in list Returns: list of ints return list(range(start, stop + 1, step)) For example: Test Result disp(all(make_list(1, 2, 11)== [1 3 5 7 9 11])) 1 disp(all(make_list(10, -2, -10) == [10 8 6 4 2 0 -2 -4 -6 -8 -10])) 1arrow_forwardConsider possible optionalities for authors writing books.arrow_forwardTrue or False: A data preprocessing module is whereextraction begins for a biometric system.arrow_forward
- Subject Name: Python Download dataset from: https://www.mediafire.com/file/zaojfoofemzc2dj/air_quality.csv/file Question; Tasks: Task • Load the required dataset (air_qaulity.csv) into your python file and explore your data • Create a pivot table that shows the maximum value of emission for each city and fill null value if any withzero. • Create a new data frame that contains the data of 'London' city and explore your data. • Set the appropriate data type for the column datatime and make it as index. • Use resample () to show the weekly total value of emission that produced at London city. Finally, create a clear bar chart that shows the result of tasks Pythons Code: Use the appropriate python commands to implement the following tasks and show the result. Please add the task question as comment before the code. It is not allowed to do manual changes into the given dataset. Your code should be clear, clean and in the same order of the tasks.arrow_forwardSafe Datalog Rule: A Datalog rule is of the form:p :- q1, ..., qn. where n>0 and p is a positive atomic formula and q1, ..., and qn are positive or negative atomic formulas. A positive atomic formula is of the form:r(x1, ..., xm) and a negative atomic formulas of the form:not r(x1, ..., xm) where m>0 and r is a relation name and x1 , ..., xm are either numbers or variables. Relation names and variables are made up of alphabetic letters or digits and start with a lower-case alphabetic letter. Even though the variables are made up of lower and upper-case letters, these should be considered case-insensitive. For example, cno, CNO, cNO, etc all should be treated as the same variable. Some examples of Datalog rules are given below: ancestor(x1, y1) :- parent(x1, y1). teaches(tno,cno) :- faculty(tno), course(cno), assigned(tno,cno). p(x,y) :- q(2,x), r(u,45,z), s(a,b,22). p(x,y,z) :- q(x), not r(y,20), s(x,z). A Datalog rule is considered “Safe” if all variables that appear to the left…arrow_forwardUse Python Code Your task is : Visualization of confirmed cases of COVID-19 by country . (Use pandas to read the data table csv. Example df = pd.read_csv('COVID19.csv' ) then make a visualization using that csv table) Province/State Country Lat Long ######## ######## ######## ######## ######## ######## ######## ######## ######## ######## 2/1/2020 2/2/2020 2/3/2020 2/4/2020 2/5/2020 2/6/2020 2/7/2020 2/8/2020 2/9/2020 ######## ######## ######## ######## ######## ######## ######## ######## ######## ######## ######## ######## ######## ######## ######## ######## ######## ######## ######## ######## 3/1/2020 3/2/2020 3/3/2020 3/4/2020 3/5/2020 3/6/2020 3/7/2020 3/8/2020 3/9/2020 ######## ######## ######## ######## ######## ######## ######## ######## ######## ######## ######## ######## ######## ######## ######## ######## ######## ######## ######## ######## ######## ######## 4/1/2020 4/2/2020 4/3/2020 4/4/2020 4/5/2020 4/6/2020 4/7/2020 Afghanistan 33 65 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Systems ArchitectureComputer ScienceISBN:9781305080195Author:Stephen D. BurdPublisher:Cengage Learning
Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning