This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
given an array of size n in which every number is between 1 and n, determine if there are any duplicates. | |
ask dumb questions: | |
are they ints, is it sorted, are there any restrictions. Can you use additional space. Can it be empty. | |
go with brute force question (make sure it's rock solid) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*Checks 4 cases: | |
* when no argument is supplied & there are no stopped jobs | |
* when no argument is supplied & there is a stopped job | |
* when an argument is supplied & there is no stopped job at that jid or the argument is junk | |
* when an argument is supplied & there is a stopped job at that jid */ | |
void | |
execute_bg_command() | |
{ | |
struct list_elem *eJob = list_rbegin(&job_list); | |
struct esh_pipeline * lastJob = list_entry(eJob, struct esh_pipeline, elem); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool | |
execute_plugin(struct esh_command * cmd) | |
{ | |
struct list_elem * e = list_begin(&esh_plugin_list); | |
for (; e != list_end(&esh_plugin_list); e = list_next (e)){ | |
struct esh_plugin * currPlugin = list_entry(e, struct esh_plugin, elem); | |
if(currPlugin->process_builtin == NULL){ | |
continue; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Fit a linear regression line to model IncomePerCapita 'y' as a function of | |
#PercentCollegeGrad 'x' from the states.csv data set. | |
### Imports ### | |
import numpy as np | |
import pandas as pd | |
from pandas import Series, DataFrame | |
import os | |
os.chdir('/home/edward/workspace/school/datavis') | |
os.getcwd() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 Nevada | |
30 New Jersey | |
6 Connecticut | |
32 New York | |
38 Pennsylvania | |
22 Michigan | |
13 Illinois | |
14 Indiana | |
11 Hawaii | |
9 Florida |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Gather some data that is of interest to you. | |
# Analyze the data using a scatterplot matrix. List at least 3 non-trivial | |
#findings about the data, along with plot pictures that show the findings. | |
### Imports ### | |
import numpy as np | |
import pandas as pd | |
from pandas import Series, DataFrame | |
import os |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#class survey data surveyV01.csv | |
#Use Pandas to clean all the problems you can find in the data and write a | |
#single clean surveyCleaned_LastName.csv file. | |
#Submit a list of all the types of problems you found, and for each problem | |
#show the Python code you used to fix it, in the textbox. | |
### Imports ### | |
import numpy as np |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Gather some data that is of interest to you. | |
# Analyze the data using a scatterplot matrix. List at least 3 non-trivial | |
#findings about the data, along with plot pictures that show the findings. | |
### Imports ### | |
import numpy as np | |
import pandas as pd | |
from pandas import Series, DataFrame | |
import os |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def main(): | |
PF1 = "124*+3-22+-3/2/3*" | |
PF2 = "65-4*54/7*+9-9-" | |
global tos | |
tos = -1 | |
def push(s, elem): | |
global tos | |
tos = 1+tos |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 | |
/ \ | |
2 6 | |
/ \ | |
1 3 | |
\ | |
4 |