Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Contenido
CSS.....................................................................................................................................................3
GRID...............................................................................................................................................3
Código........................................................................................................................................3
CRITICAL CSS..................................................................................................................................3
Dependencias o librerías................................................................................................................3
Bootstrap4..................................................................................................................................3
SASS................................................................................................................................................3
BEM............................................................................................................................................3
SQL.................................................................................................................................................3
Selecting.....................................................................................................................................3
Ordering.....................................................................................................................................3
Filtering......................................................................................................................................3
Aggregating................................................................................................................................3
Text Manipulation......................................................................................................................3
Join.............................................................................................................................................4
Unifying tables...........................................................................................................................4
CRUD..........................................................................................................................................4
Variables.....................................................................................................................................4
Temporary Tables.......................................................................................................................4
PYTHON..............................................................................................................................................4
DECORATORS.................................................................................................................................4
VIRTUAL ENVIRONMENT................................................................................................................4
DJANGO..........................................................................................................................................4
Start Proyect...............................................................................................................................4
Create Super User......................................................................................................................5
Connect with mysql database....................................................................................................5
ARTIFICIAL INTELLIGENCE...............................................................................................................5
SUPERVISED LEARNING..............................................................................................................5
UNSUERVISED LEARNING...........................................................................................................5
GIT......................................................................................................................................................5
START.............................................................................................................................................5
COMMIT.........................................................................................................................................5
CONNECT TO REPOSITORY.............................................................................................................5
FORCE CONECTION TO REPOSITORY..............................................................................................5
REACT.................................................................................................................................................5
INSTALL..........................................................................................................................................5
INIT PROJECT..................................................................................................................................6
INIT ENVIRONMENT DEVELOPER....................................................................................................6
ANGULAR...........................................................................................................................................6
INIT.................................................................................................................................................6
START.............................................................................................................................................6
BI SOLUTION.......................................................................................................................................7
Process of BI Solution.....................................................................................................................7
Planing BI solution..........................................................................................................................7
Master Data Managment...........................................................................................................7
ETL..............................................................................................................................................7
DataWarehouse.........................................................................................................................7
Data Models...............................................................................................................................7
Reporting and analyzis...............................................................................................................7
CSS
GRID
Código
Display: grid; /*Se utiliza para mostrar el layout de grid*/
CRITICAL CSS
https://jonassebastianohlsson.com/criticalpathcssgenerator/ #Página para obtener
el critical CSS o el css del viewport
Dependencias o librerías
Bootstrap4
https://getbootstrap.com/docs/4.4/getting-started/introduction/ #Para
iniciar a usar Bootstrap
SASS
BEM
Block __element—modifier
Button__state—red
SQL
Selecting
SELECT
Ordering
ORDER BY
Filtering
WHERE
HAVING
Aggregating
SUM
COUNT
MIN
MAX
AVG
Text Manipulation
LEFT
RIGHT
LEN
SUBSTRING
Join
INNER JOIN
LEFT JOIN
RIGHT JOIN
Unifying tables
UNION
UNION ALL
CRUD
Create
Read
Update
Delete
Variables
DECLARE @myVariable INT #or type
Temporary Tables
Select * INTO #myTemporaryTable
PYTHON
DECORATORS
VIRTUAL ENVIRONMENT
pip install virtualenv #instala dependencia
virtualenv mypython #crea el entorno virtual con nombre ‘mypython’ sin escoger la
versión a usar
DJANGO
Start Proyect
django-admin startproject mysite #Write above in console
Create Super User
python manage.py createsuperuser
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'nombreDB',
'USER': 'nombreusuario',
'PASSWORD': 'pass',
'HOST': 'localhost',
'PORT': '3306',
}
} #Se agrea en settings.py de principal
ARTIFICIAL INTELLIGENCE
SUPERVISED LEARNING
ComunLibraries
KNeighborsClassifier
from sklearn.neighbors import KNeighborsClassifier #import library
LinearRegression
from sklearn.linear_model import LinearRegression #import Library
Cross Validation
from sklearn.model_selection import cross_val_score #import Library
Ridge Regression
from sklearn.linear_model import Ridge
ridge = Ridge(normalize=True)
print(confusion_matrix(y_test, y_pred))
print(classification_report(y_test, y_pred))
Logistic Regression
from sklearn.linear_model import LogisticRegression
logreg = LogisticRegression()
GridSearchCv
from sklearn.model_selection import GridSearchCV
param_grid = {'C': c_space} #in logistic Regression we have
a parameter of regularization named C that is the invese of
lambda and is used like penality
DecisionTreeClassifier
ElasticNet
from sklearn.linear_model import ElasticNet
UNSUPERVISED LEARNING
KMeans
from sklearn.cluster import KMeans # Import KMeans
xs = new_points[:,0]
ys = new_points[:,1]
# Make a scatter plot of xs and ys, using labels to define the colors
centroids = model.cluster_centers_
# Assign the columns of centroids: centroids_x, centroids_y
centroids_x = centroids[:,0]
centroids_y = centroids[:,1]
plt.show()
#because we don´t know about how many clusters we need, so, we putt he
next code to find a solution to this problema using many differents
clusters to fit the model and find the best prediction:
ks = range(1, 6)
inertias = []
for k in ks:
model = KMeans(n_clusters=k)
model.fit(samples)
inertias.append(model.inertia_)
# Plot ks vs inertias
plt.plot(ks, inertias, c)
plt.ylabel('inertia')
plt.xticks(ks)
plt.show()
#In fact we normally use the cluster that decrease the inertia but it
allow us considerable speed in training.
#after we choose the correct cluster, we use it in a new model, and print
the crosstab to find what is the relation between predicted labels and
correct labels, for example
#labels
#0 2 60 10
#1 0 1 60
#2 68 9 0
#past table tell us that the labe predicted 0 had 60 times correlation
whit Kama wheat.
model = KMeans(n_clusters=3)
labels = model.fit_predict(samples)
print(labels)
print(varieties)
# Create crosstab: ct
ct = pd.crosstab(df['labels'], df['varieties'])
# Display ct
print(ct)
#most of times we had a data that is not normalized or scaled, this makes
that training go slowly, to crrect this, we use the Scaler and Normalizer
from sklearn.
scaler = StandardScaler()
kmeans = KMeans(n_clusters=4)
# Import pandas
import pandas as pd
pipeline.fit(samples)
labels = pipeline.predict(samples)
df = pd.DataFrame({'labels':labels, 'species':species})
# Create crosstab: ct
ct = pd.crosstab(df['labels'], df['species'])
# Display ct
print(ct)
#Normalizer:
# Import Normalizer
normalizer = Normalizer()
kmeans = KMeans(n_clusters=10)
pipeline.fit(movements)
# Import pandas
import pandas as pd
labels = pipeline.predict(movements)
print(df.sort_values('labels'))
GIT
START
git init
COMMIT
git add .
CONNECT TO REPOSITORY
git remote add origin git@github.com:username/new_repo #Agrega dirección
git pull origin master #actualiza archivo en local
REACT
INSTALL
npm install -g create-react-app
INIT PROJECT
create-react-app -nombre del proyecto-
ANGULAR
INIT
npm install @angular/cli -g # instala angular
ng -v #muestra la versión
START
ng serve #Inicia la aplicación en el browser en http://localhost:4200/
BI SOLUTION
Process of BI Solution
Planing BI solution
Alway need to have some considerations like Data Volumen, Analysis and reporting that
includes the query you make in system, number of users and Availability