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
# prompt | |
# export PS1="\u [\T]$ " | |
# export PS1="[\u]\$PWD$" | |
export PS1="\[\033[38;5;6m\][\w]\[$(tput sgr0)\]\[\033[38;5;15m\] \T\[$(tput sgr0)\]\[\033[38;5;6m\]\[$(tput sgr0)\]\[\0 | |
33[38;5;15m\] \\$\[$(tput sgr0)\] " | |
# export PS1="___________________ | \w @ \h (\u) \n| => " | |
# export PS2="| => " | |
alias ll='ls -FGlAhp' |
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
# prompt | |
# export PS1="\u [\T]$ " | |
# export PS1="[\u]\$PWD$" | |
export PS1="\[\033[38;5;6m\][\w]\[$(tput sgr0)\]\[\033[38;5;15m\] \T\[$(tput sgr0)\]\[\033[38;5;6m\]\[$(tput sgr0)\]\[\0 | |
33[38;5;15m\] \\$\[$(tput sgr0)\] " | |
# export PS1="___________________ | \w @ \h (\u) \n| => " | |
# export PS2="| => " | |
alias ll='ls -FGlAhp' |
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 | |
table_schema, | |
table_name, | |
round(((data_length + index_length) / 1024 / 1024), 2) `Size in MB`, | |
sum(table_rows) Rows | |
FROM information_schema.TABLES | |
WHERE table_schema='paretodb' | |
GROUP BY 1,2 | |
ORDER BY (data_length + index_length) DESC | |
LIMIT 100 |
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
sudo apt-get update # Fetches the list of available updates | |
sudo apt-get upgrade # Strictly upgrades the current packages | |
sudo apt-get dist-upgrade # Installs updates (new ones) |
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
General Purpose - Current Generation | |
| vCPU | ECU | Memory (GiB) | Instance Storage (GB) | Linux/UNIX Usage | | |
============|======|==========|==============|=======================|==================|========== | |
t2.nano | 1 | Variable | 0.5 | EBS Only | $0.0058 | per Hour | |
t2.micro | 1 | Variable | 1 | EBS Only | $0.0116 | per Hour | |
t2.small | 1 | Variable | 2 | EBS Only | $0.023 | per Hour | |
t2.medium | 2 | Variable | 4 | EBS Only | $0.0464 | per Hour | |
t2.large | 2 | Variable | 8 | EBS Only | $0.0928 | per Hour | |
t2.xlarge | 4 | Variable | 16 | EBS Only | $0.1856 | per Hour |
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
update tableA a | |
inner join tableB b | |
on a.RTPropertyUniqueIdentifier=b.RTPropertyUniqueIdentifier | |
SET a.fips=b.SitusStateCountyFIPS, | |
a.col2=b.col2; | |
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
# To select rows whose column value equals a scalar, some_value, use ==: | |
df.loc[df['column_name'] == some_value] | |
# To select rows whose column value is in an iterable, some_values, use isin: | |
df.loc[df['column_name'].isin(some_values)] | |
# Combine multiple conditions with &: |
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
# empty dictionary for storing DataFrames | |
results = {} | |
# list of params for query | |
my_list = ['MX19', 'MX20', 'MX21', 'MX22', 'MX23', 'MX24', 'MX25', 'MX26', 'MX27', 'MX28', 'MX29', 'MX30', 'MX31', 'MX32'] | |
for x in my_list: | |
ADM = """ | |
SELECT a.SQLDATE, |
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
SitusAddress, | |
SitusCity, | |
SitusState, | |
SitusZip, | |
SitusZip4, | |
SitusCounty, | |
SitusStateCountyFIPS, | |
PropertyType, | |
PropertyZoning, | |
PropertyGroup, |
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 | |
import pandas as pd | |
from sklearn.pipeline import Pipeline | |
from sklearn.preprocessing import StandardScaler, Binarizer | |
from sklearn.base import TransformerMixin, BaseEstimator | |
""" | |
PyData Chicago |
OlderNewer