adding gitignore and ml
This commit is contained in:
parent
78552cd92c
commit
60cb405145
163
.gitignore
vendored
163
.gitignore
vendored
|
@ -1 +1,162 @@
|
|||
notes\ cours\ python
|
||||
|
||||
# Created by https://www.gitignore.io/api/vim,python,visualstudiocode
|
||||
# Edit at https://www.gitignore.io/?templates=vim,python,visualstudiocode
|
||||
|
||||
### Python ###
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
|
||||
# Distribution / packaging
|
||||
.Python
|
||||
build/
|
||||
develop-eggs/
|
||||
dist/
|
||||
downloads/
|
||||
eggs/
|
||||
.eggs/
|
||||
lib/
|
||||
lib64/
|
||||
parts/
|
||||
sdist/
|
||||
var/
|
||||
wheels/
|
||||
pip-wheel-metadata/
|
||||
share/python-wheels/
|
||||
*.egg-info/
|
||||
.installed.cfg
|
||||
*.egg
|
||||
MANIFEST
|
||||
|
||||
# PyInstaller
|
||||
# Usually these files are written by a python script from a template
|
||||
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||
*.manifest
|
||||
*.spec
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
pip-delete-this-directory.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
htmlcov/
|
||||
.tox/
|
||||
.nox/
|
||||
.coverage
|
||||
.coverage.*
|
||||
.cache
|
||||
nosetests.xml
|
||||
coverage.xml
|
||||
*.cover
|
||||
.hypothesis/
|
||||
.pytest_cache/
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
*.pot
|
||||
|
||||
# Django stuff:
|
||||
*.log
|
||||
local_settings.py
|
||||
db.sqlite3
|
||||
db.sqlite3-journal
|
||||
|
||||
# Flask stuff:
|
||||
instance/
|
||||
.webassets-cache
|
||||
|
||||
# Scrapy stuff:
|
||||
.scrapy
|
||||
|
||||
# Sphinx documentation
|
||||
docs/_build/
|
||||
|
||||
# PyBuilder
|
||||
target/
|
||||
|
||||
# Jupyter Notebook
|
||||
.ipynb_checkpoints
|
||||
|
||||
# IPython
|
||||
profile_default/
|
||||
ipython_config.py
|
||||
|
||||
# pyenv
|
||||
.python-version
|
||||
|
||||
# pipenv
|
||||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
||||
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
||||
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
||||
# install all needed dependencies.
|
||||
#Pipfile.lock
|
||||
|
||||
# celery beat schedule file
|
||||
celerybeat-schedule
|
||||
|
||||
# SageMath parsed files
|
||||
*.sage.py
|
||||
|
||||
# Environments
|
||||
.env
|
||||
.venv
|
||||
env/
|
||||
venv/
|
||||
ENV/
|
||||
env.bak/
|
||||
venv.bak/
|
||||
|
||||
# Spyder project settings
|
||||
.spyderproject
|
||||
.spyproject
|
||||
|
||||
# Rope project settings
|
||||
.ropeproject
|
||||
|
||||
# mkdocs documentation
|
||||
/site
|
||||
|
||||
# mypy
|
||||
.mypy_cache/
|
||||
.dmypy.json
|
||||
dmypy.json
|
||||
|
||||
# Pyre type checker
|
||||
.pyre/
|
||||
|
||||
### Vim ###
|
||||
# Swap
|
||||
[._]*.s[a-v][a-z]
|
||||
[._]*.sw[a-p]
|
||||
[._]s[a-rt-v][a-z]
|
||||
[._]ss[a-gi-z]
|
||||
[._]sw[a-p]
|
||||
|
||||
# Session
|
||||
Session.vim
|
||||
Sessionx.vim
|
||||
|
||||
# Temporary
|
||||
.netrwhist
|
||||
*~
|
||||
# Auto-generated tag files
|
||||
tags
|
||||
# Persistent undo
|
||||
[._]*.un~
|
||||
|
||||
### VisualStudioCode ###
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
|
||||
### VisualStudioCode Patch ###
|
||||
# Ignore all local history of files
|
||||
.history
|
||||
|
||||
# End of https://www.gitignore.io/api/vim,python,visualstudiocode
|
||||
|
|
11
ML/udemy/Data.csv
Executable file
11
ML/udemy/Data.csv
Executable file
|
@ -0,0 +1,11 @@
|
|||
Country,Age,Salary,Purchased
|
||||
France,44,72000,No
|
||||
Spain,27,48000,Yes
|
||||
Germany,30,54000,No
|
||||
Spain,38,61000,No
|
||||
Germany,40,,Yes
|
||||
France,35,58000,Yes
|
||||
Spain,,52000,No
|
||||
France,48,79000,Yes
|
||||
Germany,50,83000,No
|
||||
France,37,67000,Yes
|
|
21
ML/udemy/fill_empty_data.py
Normal file
21
ML/udemy/fill_empty_data.py
Normal file
|
@ -0,0 +1,21 @@
|
|||
# Data preprocessing
|
||||
import numpy as np
|
||||
import matplotlib.pyplot as plt
|
||||
import pandas as pd
|
||||
|
||||
# Importing the dataset
|
||||
dataset = pd.read_csv('Data.csv')
|
||||
# Create the matrix of features (independant variables)
|
||||
# [:, = lines -- all of them
|
||||
# :-1] = colums -- all of them unless the last one
|
||||
# X = (Country, Age, Salary)
|
||||
X = dataset.iloc[:, :-1].values
|
||||
# Create vector of linked variables
|
||||
# [:, 3] = all values of the 3rd column
|
||||
# Y = (Purchased)
|
||||
X = dataset.iloc[:, 3].values
|
||||
|
||||
# Taking care of the missing data
|
||||
from sklearn.model_selection import train_test_split
|
||||
|
||||
imputer = Imputer(missing_values = 'NaN', strategy = 'mean', axis = 0)
|
|
@ -4,4 +4,8 @@ alphabet = string.ascii_lowercase
|
|||
|
||||
s = 'azcbobobegghakl'
|
||||
count = 0
|
||||
print(alphabet)
|
||||
|
||||
for i in s:
|
||||
print i
|
||||
print index(i)
|
||||
|
|
Loading…
Reference in a new issue