Skip to content

Instantly share code, notes, and snippets.

View sample-response-2.json
{
"location": {
"name": "Nederland",
"region": "Colorado",
"country": "United States of America",
"lat": 39.96,
"lon": -105.5,
"tz_id": "America/Denver",
"localtime_epoch": 1608142276,
"localtime": "2020-12-16 11:11"
@glamp
glamp / clubhouse.md
Last active Nov 22, 2020
Bug Reporting Templates
View clubhouse.md

Environment

URL: Stage: <dev/staging/qa/prod> (if applicable)

Logs

View calculate_timing.js
export const calculateLoadTimes = () => {
// Check performance support
if (performance === undefined) {
return [];
}
// Get a list of "resource" performance entries
const resources = performance.getEntriesByType("resource");
if (resources === undefined || resources.length <= 0) {
return [];
View scrapy-error.log
Packing version 98c8d04-master
Deploying to Scrapy Cloud project "373200"
Deploy log last 3 lines:
{"message": "500 Server Error: Internal Server Error for url: https://kumo-builder-prod.dc21.scrapinghub.com:2376/v1.27/auth", "error": "internal_error"}
View scikit-example.py
from sklearn.ensemble import RandomForestClassifier
clf = RandomForestClassifier()
target_variable = 'does-make-more-than-50k'
columns = ['age', 'education', 'hours-worked-per-week']
clf.fit(df[columns], df[target_variable])
@glamp
glamp / docker-compose.yml
Created Apr 2, 2018
Docker compose file for Wordpress.
View docker-compose.yml
version: '3.3'
services:
db:
image: mysql:5.7
volumes:
- dbdata:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: somewordpress
View idledark.vim
" Generated by Color Theme Generator at Sweyla
" http://sweyla.com/themes/seed/690000/
set background=dark
hi clear
if exists("syntax_on")
syntax reset
endif
View .vim-colors-idledark.vim
" Generated by Color Theme Generator at Sweyla
" http://sweyla.com/themes/seed/690000/
set background=dark
hi clear
if exists("syntax_on")
syntax reset
endif
View yhat-scienceops-cleanup.sh
#!/usr/bin/env bash
# make sure the user running this script has permission to run docker
docker ps > /dev/null
# remove "<none>" images
docker rmi -f $(docker images | grep none | awk '{ print $3 }')
# cleanup exited containers
docker rm -f $(docker ps -f status=exited -q)
View imdb_fasttext.py
from __future__ import print_function
import numpy as np
np.random.seed(1337) # for reproducibility
from keras.preprocessing import sequence
from keras.models import Sequential
from keras.layers import Dense, Flatten
from keras.layers import Embedding
from keras.layers import AveragePooling1D
from keras.datasets import imdb