This file contains 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
import os, sys | |
from google.colab import drive | |
drive.mount('/content/gdrive') | |
#create a path to save the module | |
nb_path = '/content/notebooks' | |
os.symlink('/content/gdrive/My Drive/Colab Notebooks', nb_path) | |
sys.path.insert(0, nb_path) |
This file contains 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
#Import libraries | |
import numpy as np | |
from scipy.stats import randint | |
from catboost import CatBoostClassifier | |
from sklearn.model_selection import RandomizedSearchCV | |
# load data | |
cancer = datasets.load_breast_cancer() | |
# target |
This file contains 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
#import libraries | |
from sklearn import datasets | |
from catboost import CatBoostClassifier | |
from sklearn.model_selection import GridSearchCV | |
# load data | |
cancer = datasets.load_breast_cancer() | |
# target | |
y = cancer.target |
This file contains 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
#import libraries | |
from sklearn import datasets | |
from catboost import CatBoostClassifier | |
from sklearn.model_selection import cross_val_score | |
# load data | |
cancer = datasets.load_breast_cancer() | |
# target | |
y = cancer.target |
This file contains 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
/* | |
Write a query that prints a list of employee names (i.e.: the name attribute) for employees in | |
Employee having a salary greater than 2000 per month who have been employees for less than months. | |
Sort your result by ascending employee_id. | |
*/ | |
SELECT name | |
FROM Employee | |
WHERE (salary > 2000) AND (months< 10) | |
ORDER BY employee_id; |
This file contains 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
/* | |
Write a query that prints a list of employee names (i.e.: the name attribute) from the Employee table in alphabetical order. | |
*/ | |
SELECT name | |
FROM Employee | |
ORDER BY name; |
This file contains 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
/* | |
Query the Name of any student in STUDENTS who scored higher than Marks. Order your output by the last three characters of each name. If two or more students both have names ending in the same last three characters (i.e.: Bobby, Robby, etc.), secondary sort them by ascending ID. | |
*/ | |
SELECT Name | |
FROM STUDENTS | |
WHERE Marks > 75 | |
ORDER BY RIGHT(Name, 3) , ID ; |
This file contains 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
/* | |
Query the list of CITY names from STATION that do not start with vowels and do not end with vowels. Your result cannot contain duplicates. | |
*/ | |
SELECT DISTINCT CITY | |
FROM STATION | |
WHERE (RIGHT(UPPER(CITY), 1) NOT IN ('A', 'E', 'I', 'O', 'U')) AND (LEFT(UPPER(CITY), 1) NOT IN ('A', 'E', 'I', 'O', 'U')) |
This file contains 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
/* | |
Query the list of CITY names from STATION that either do not start with vowels or do not end with vowels. Your result cannot contain duplicates. | |
*/ | |
SELECT DISTINCT CITY | |
FROM STATION | |
WHERE (RIGHT(UPPER(CITY), 1) NOT IN ('A', 'E', 'I', 'O', 'U')) OR (LEFT(UPPER(CITY), 1) NOT IN ('A', 'E', 'I', 'O', 'U')) |
This file contains 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
/* | |
Query the list of CITY names from STATION that do not end with vowels. Your result cannot contain duplicates. | |
*/ | |
SELECT DISTINCT CITY | |
FROM STATION | |
WHERE RIGHT(UPPER(CITY), 1) NOT IN ('A', 'E', 'I', 'O', 'U') |
NewerOlder