This file contains hidden or 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
// NOTE: DO NOT DISABLE THIS ON YOUR OWN! | |
// This lint is disabled here knowing that the contract for this | |
// helper is that no untrusted content is passed in. If you disable | |
// this lint and use htmlSafe elsewhere, you could risk opening up an | |
// XSS vulnerability. | |
// eslint-disable-next-line name-xss/avoid-xss-risks | |
import { htmlSafe } from '@ember/template'; | |
const DEFAULT_SAFE_TAGS = ['strong', 'em', 'b', 'i', 'u', 'br']; |
This file contains hidden or 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
" | |
with table_stats as ( | |
select psut.relname, | |
psut.n_live_tup, | |
1.0 * psut.idx_scan / greatest(1, psut.seq_scan + psut.idx_scan) as index_use_ratio | |
from pg_stat_user_tables psut | |
order by psut.n_live_tup desc | |
), | |
table_io as ( | |
select psiut.relname, |
This file contains hidden or 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 pandas as pd | |
from datetime import datetime | |
cal = pd.read_csv('cal.csv') | |
# clean summary | |
cal = cal.query("summary not in ('Mid-week Meditation', 'Coffee Chat: Meet our New Hires!')") | |
cal = cal[cal['summary'].str.contains("Company Holiday") == False] | |
# clean dtstart |
This file contains hidden or 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 pandas as pd | |
import numpy as np | |
from datetime import datetime | |
import matplotlib.pyplot as plt | |
cal = pd.read_csv('cal.csv') | |
# clean summary | |
cal = cal.query("summary not in ('Mid-week Meditation', 'Coffee Chat: Meet our New Hires!', 'PED Lunch & Learn Hold', 'AskPeople')") | |
cal = cal[cal['summary'].str.contains("Company Holiday") == False] |
This file contains hidden or 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 pandas as pd | |
import numpy as np | |
from datetime import datetime, time | |
#import matplotlib.pyplot as plt | |
from sklearn.linear_model import LinearRegression | |
from sklearn.model_selection import train_test_split | |
from sklearn.metrics import r2_score, mean_squared_error | |
from sklearn.ensemble import RandomForestClassifier |
This file contains hidden or 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 pandas as pd | |
import numpy as np | |
from datetime import datetime, time | |
from sklearn.linear_model import Lasso, Ridge, LogisticRegression | |
from sklearn.metrics import classification_report, confusion_matrix | |
import matplotlib.pyplot as plt | |
from sklearn.linear_model import LinearRegression | |
from sklearn.model_selection import train_test_split | |
from sklearn.metrics import r2_score, mean_squared_error, roc_auc_score |
This file contains hidden or 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 module for data manipulation | |
import pandas as pd | |
# Import module for linear algebra | |
import numpy as np | |
# Import module for Fuzzy string matching | |
from fuzzywuzzy import fuzz, process | |
# Import module for regex | |
import re | |
# Import module for iteration | |
import itertools |
This file contains hidden or 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 nspname || '.' || relname AS "relation", | |
pg_size_pretty(pg_total_relation_size(C.oid)) AS “total_size” | |
FROM pg_class C | |
LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace) | |
WHERE nspname NOT IN ('pg_catalog', 'information_schema') | |
AND C.relkind <> 'i' | |
AND nspname ~ '^pg_toast' | |
ORDER BY pg_total_relation_size(C.oid) DESC | |
LIMIT 150; |
OlderNewer