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
#from kaggle | |
# Colab library to upload files to notebook | |
from google.colab import files | |
# Install Kaggle library | |
!pip install -q kaggle | |
#update dulu | |
!pip install kaggle --upgrade | |
# Upload kaggle API key file |
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 numpy as np | |
from sklearn import linear_model, metrics | |
class MarketingCosts: | |
# param marketing_expenditure list. Expenditure for each previous campaign. | |
# param units_sold list. The number of units sold for each previous campaign. | |
# param desired_units_sold int. Target number of units to sell in the new campaign. | |
# returns float. Required amount of money to be invested. | |
@staticmethod |
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 pandas as pd | |
import numpy as np | |
class StockPrices: | |
# param prices dict of string to list. A dictionary containing the tickers of the stocks, and each tickers daily prices. | |
# returns list of strings. A list containing the tickers of the two most correlated stocks. | |
@staticmethod | |
def most_corr(prices): | |
prices = pd.DataFrame.from_dict(prices) | |
korel = prices.pct_change().corr() |
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
SELECT name | |
FROM employees | |
WHERE (id NOT IN | |
(SELECT managerId | |
FROM employees | |
WHERE (managerId IS NOT NULL))); |
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
SELECT COUNT(firstName) | |
FROM students | |
WHERE firstName = "John"; |
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
package com.example.atyrachma.iaktugas2; | |
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.view.View; | |
import android.widget.TextView; | |
import java.text.NumberFormat; | |
/** |