Skip to content

Instantly share code, notes, and snippets.

View abdel1979's full-sized avatar
💭
Data scientist

abdel1979

💭
Data scientist
View GitHub Profile
FROM python:3
COPY wallet.py ./
COPY requirements.txt ./
COPY dataTraining.csv ./
RUN pip install -r requirements.txt
CMD ["python", "wallet.py", "/data/input.csv"]
import sys
import warnings
warnings.filterwarnings("ignore", category=FutureWarning)
import math
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.impute import SimpleImputer
from sklearn.metrics import mean_squared_error
from sklearn.linear_model import LinearRegression
import pandas as pd
import matplotlib.pyplot as plt
from scipy import special
import numpy as np
# Read the data
data = pd.read_csv('raw_scores.list1',sep=' ', header=None)
x = data[1]
from django.urls import path
from . import views
urlpatterns = [
path('', views.index, name='index'),
]
from django.http import HttpResponse
def index(request):
return HttpResponse("Salam World - This is my firts Django in Docker and accesible from AWS")
from django.shortcuts import render
# Create your views here.
from django.http import HttpResponse
def index(request):
return HttpResponse(" Salam World - this is my first Django on Docker accesible from AWS ")
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.compose import ColumnTransformer
from sklearn.pipeline import Pipeline
from sklearn.impute import SimpleImputer
from sklearn.preprocessing import OneHotEncoder
from sklearn.ensemble import RandomForestRegressor
from sklearn.metrics import mean_absolute_error
from xgboost import XGBRegressor
@abdel1979
abdel1979 / Real-Estate_prediction_model.py
Last active May 17, 2019 01:16
Real Estate prediction model to predict home price based on rooms numbers area and location.
import pandas as pd
sf = pd.read_csv('final_data.csv')
sf.head()
#columns not needed will be deleted
sf.drop(sf.columns[[0, 2, 3, 15, 17, 18]], axis=1, inplace=True)
#display dataset structure
sf.info()
# Display min and max sold date / display min,max,mean,deviation,25% .. and some other statics
print(sf.lastsolddate.min())
print(sf.lastsolddate.max())
import pandas as pd
import numpy as np # For mathematical calculations
import seaborn as sns # For data visualization
import matplotlib.pyplot as plt # For plotting graphs
import warnings # To ignore any warnings
warnings.filterwarnings("ignore")
dataset=pd.read_csv("cancer.csv")
X = dataset.iloc[:, 1:31].values
Y = dataset.iloc[:, 31].values
import pandas as pd
import numpy as np # For mathematical calculations
import seaborn as sns # For data visualization
import matplotlib.pyplot as plt # For plotting graphs
import warnings # To ignore any warnings
warnings.filterwarnings("ignore")
train=pd.read_csv("training.csv")
test=pd.read_csv("test.csv")
train_original=pd.read_csv("training.csv")