Skip to content

Instantly share code, notes, and snippets.

View kelvintaywl's full-sized avatar

Kelvin Tay kelvintaywl

View GitHub Profile
alert('hello');

See current version

SELECT version();

Check if DB recovery is paused

SELECT pg_is_xlog_replay_paused();
# list comprehension
# instead of:
# names = []
# for name in ['clarke', 'bruce', 'conor']:
# if name.startswith('c'):
# names.append(name.upper())
names = [
names.upper()

LGTM

 [![LGTM](http://lgtm.in/p/Us4ZUEZin)](http://lgtm.in/i/Us4ZUEZin)

PulpFiction

./images/jules.png

English, ****! Do you speak it?*

A simple tool to detect non-English commments in a code base (directory).

<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head><meta charset="utf-8"><meta http-equiv="Content-Type" content="text/html;charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="format-detection" content="telephone=no,email=no,address=no"><title>Take %s OFF – Expires soon</title><style>/* common-responsive-content */
body {
padding: 0;
margin: 0;
font-family: sans-serif;
background: #f2efeb; }
.gmailfix {
display: none;
display: none !important; }
print('hello')
curl http://www.google.com
echo 'hello'
mlpRegressor = MLPRegressor(hidden_layer_sizes=100, activation="relu", solver="lbfgs")
mlpRegressor.fit(train_data, y_train)
rmse_score, r2_score = test(mlpRegressor, test_data, test_ans)
print(f'score: RMSE={rmse_score:.4f}, R2={r2_score:.4f}')