A collection of links to the excellent "Composing Software" series of medium stories by Eric Elliott.
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 re | |
| import itertools | |
| from bs4 import BeautifulSoup | |
| import requests | |
| import scrapy | |
| def xpath_soup(element): | |
| """ | |
| Generate xpath from BeautifulSoup4 element | |
| :param element: BeautifulSoup4 element. |
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
| const gulp = require("gulp"), | |
| autoprefixer = require("gulp-autoprefixer"), | |
| cleanCSS = require("gulp-clean-css"), | |
| sourcemaps = require("gulp-sourcemaps"), | |
| gcmq = require("gulp-group-css-media-queries"), | |
| lessC = require("gulp-less"), | |
| imagemin = require("gulp-imagemin"), | |
| uglify = require("gulp-uglify"), | |
| concat = require("gulp-concat"), | |
| rename = require("gulp-rename"), |
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
| #!/usr/bin/python | |
| import socket | |
| import struct | |
| import sys | |
| # We want unbuffered stdout so we can provide live feedback for | |
| # each TTL. You could also use the "-u" flag to Python. | |
| class flushfile(file): | |
| def __init__(self, f): |
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 sys, os, glob, re, pickle | |
| if len(sys.argv) != 2: | |
| print "USAGE: %s DIR" % sys.argv[0] | |
| sys.exit(1) | |
| DIR = sys.argv[1] | |
| INDEX = {} | |
| FILES = [] |
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 pytesseract | |
| import sys | |
| import argparse | |
| try: | |
| import Image | |
| except ImportError: | |
| from PIL import Image | |
| from subprocess import check_output |
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
| from flask import Flask | |
| from flask.ext.sqlalchemy import SQLAlchemy | |
| from flask.ext import admin, wtf | |
| from flask.ext.admin.contrib import sqlamodel | |
| app = Flask(__name__) | |
| app.config['SECRET_KEY'] = '123456790' | |
| app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///test.sqlite' | |
| db = SQLAlchemy(app) |
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
| #!/usr/bin/env python | |
| import os | |
| import xml.parsers.expat | |
| from xml.sax.saxutils import escape | |
| from optparse import OptionParser | |
| from math import log10 | |
| # How much data we process at a time |
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
| #!/usr/bin/env python | |
| import psycopg2 | |
| import sys | |
| """ | |
| Drop all tables of database you given. | |
| """ | |
| try: |
NOTE: This list is almost entirely copy/pasted from THIS awesome article. I've made my own personal edits (adding some additional content) which is why I keep it here.
Every day meanpath crawls over 200 million websites capturing the visible text, HTML source code, CSS and Javascript. This information is used by many companies to monitor the growth of web facing technology.