Skip to content

Instantly share code, notes, and snippets.

View atyrachma's full-sized avatar
🍊
I may be slow to respond.

Aty Rachmawati atyrachma

🍊
I may be slow to respond.
View GitHub Profile
@atyrachma
atyrachma / py-import-to-colab.py
Last active June 12, 2021 04:09
py-import-to-colab.py
#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
@atyrachma
atyrachma / JDS-Marketing-aty.py
Last active January 19, 2019 06:03
JDS-Marketing-aty
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
@atyrachma
atyrachma / JDS-St0ckpr1c3s-aty.py
Last active January 18, 2019 04:08
JDS-Stockprices-aty
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()
@atyrachma
atyrachma / JDS-Workers-aty.sql
Last active January 18, 2019 04:21
JDS-Workers-aty
SELECT name
FROM employees
WHERE (id NOT IN
(SELECT managerId
FROM employees
WHERE (managerId IS NOT NULL)));
@atyrachma
atyrachma / JDS-Students-aty.sql
Last active January 18, 2019 02:51
JDS-Students-aty
SELECT COUNT(firstName)
FROM students
WHERE firstName = "John";
@atyrachma
atyrachma / MainActivity.java
Created April 11, 2016 06:37
Tugas 2 IAK 2016 Beginner
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;
/**