A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.
One-line version to paste in your DevTools
Use $$
if your browser aliases it:
~ 108 byte version
# -*- coding: utf-8 -*- | |
from sqlalchemy.ext.declarative import declarative_base | |
from sqlalchemy import Column, String, Integer, ForeignKey,Boolean,DateTime,BigInteger,create_engine | |
from sqlalchemy.orm import sessionmaker,join | |
from sqlalchemy import update | |
import datetime | |
import time | |
import medium_posts_scrapper_gist as m | |
Base = declarative_base() | |
engine = create_engine("postgresql://postgres:pass@localhost:5432/medium_scrape") |
import nltk | |
import pandas as pd | |
import re | |
import pprint | |
import operator | |
import csv | |
import logging | |
from stop_words import get_stop_words | |
from collections import defaultdict | |
from gensim import corpora |
select * from | |
(select | |
--Extract all info from post_stats | |
ps.*, | |
-- Calculate the percentage for num_loves,num_wows,num_hahas,num_sads,num_angries | |
(ps.num_loves*100)/nullif((ps.num_reactions - ps.num_likes),0) perc_loves, | |
(ps.num_wows*100)/nullif((ps.num_reactions - ps.num_likes),0) perc_wows, | |
(ps.num_hahas*100)/nullif((ps.num_reactions - ps.num_likes),0) perc_hahas, | |
(ps.num_sads*100)/nullif((ps.num_reactions - ps.num_likes),0) perc_sads, | |
(ps.num_angries*100)/nullif((ps.num_reactions - ps.num_likes),0) perc_angries, |
#Source http://www.craigaddyman.com/python-queues-and-multi-threading/ | |
# standard libraries | |
from datetime import datetime | |
import Queue | |
from threading import Thread | |
# third party libraries | |
from bs4 import BeautifulSoup | |
import requests |
/* | |
NYTimes API Radial Graph Maker | |
February, 2009 | |
blprnt@blprnt.com | |
This is a simple interface to visualize the occurence of various words in the NYTimes database over time. | |
This particular version displays the results as a radial bar graph, like this: | |
http://www.flickr.com/photos/blprnt/3257552056/ |
x <- structure(c("2012-09-27 09:08:37", "2012-09-29 10:06:33", "2012-10-01 09:44:36","2012-10-04 14:37:05", "2012-10-15 13:18:21", "2012-10-17 17:33:46","2012-10-18 11:52:13", "2016-10-06 15:11:01", "2016-10-07 13:00:09","2016-10-07 12:20:57"), class = c("xts", "zoo"), .indexCLASS = "Date", tclass = "Date", .indexTZ = "UTC", tzone = "UTC", format = "%Y-%m-%d %H:%M:%S", index = structure(c(1348704000,1348876800, 1349049600, 1349308800, 1350259200, 1350432000, 1350518400,1475712000, 1475798400, 1475798400), tzone = "UTC", tclass = "Date"), .Dim = c(10L,1L)) | |
y <- structure(c("1961-08-04 10:00:00", "1971-01-01 11:00:00", "1978-01-01 11:00:00","1979-01-01 11:00:00", "1983-01-01 11:00:00", "1984-01-01 11:00:00","1985-01-01 11:00:00", "2016-10-07 20:28:24", "2016-10-07 18:27:54","2016-10-08 00:38:40"), class = c("xts", "zoo"), .indexCLASS = "Date", tclass = "Date", .indexTZ = "UTC", tzone = "UTC", format = "%Y-%m-%d %H:%M:%S", index = structure(c(-265420800,31536000, 252460800, 283996800, 410227200, 441763200, 4733 |
name | w_highway | total_km | lanes_km | maxspeed_km | ref_km | surface_km | width_km | sidewalk_km |
---|---|---|---|---|---|---|---|---|
canada | unclassified | 377,649 | 304,400 | 134,195 | 2,789 | 317,040 | 166 | 1,723 |
canada | residential | 262,424 | 213,683 | 9,844 | 2,286 | 166,879 | 28 | 11,321 |
canada | tertiary | 221,622 | 200,622 | 13,024 |