python3 and scrapy (pip install scrapy)
scrapy runspider -o items.csv -a site="https://yoursite.org" 1spider.pypython3 2format_results.py
| #/usr/bin/python3 | |
| """ Demonstration of logging feature for a Flask App. """ | |
| from logging.handlers import RotatingFileHandler | |
| from flask import Flask, request, jsonify | |
| from time import strftime | |
| __author__ = "@ivanleoncz" | |
| import logging |
| 'use strict'; | |
| var gulp = require('gulp'); | |
| var gutil = require('gulp-util'); | |
| var browserSync = require('browser-sync'); | |
| var notify = require('gulp-notify'); | |
| var less = require('gulp-less'); | |
| var autoprefix = require('gulp-autoprefixer'); | |
| var minifyCSS = require('gulp-minify-css'); | |
| var exec = require('child_process').exec; |
| /* Using this directive is as easy as 1, 2, 3. | |
| 1. Grab the Tableau API JavaScript library as well as this module. | |
| a. <script src="path/to/tableau-2.0.0.min.js"></script> | |
| b. <script src="path/to/angular-tableau.js"></script> | |
| 2. Import the module into your app by adding 'angular-tableau' to your dependencies. | |
| 3. Use the directive like this: | |
| <tableau-viz height="'500px'" | |
| url="path/to/tableau-dashboard" | |
| filters={'field1':['item1', 'item2'], 'dateField':{'min':startDate, 'max':endDate}}"> | |
| </tableau-viz> |
| import csv | |
| from django.http import HttpResponse | |
| def export_as_csv_action(description="Export selected objects as CSV file", fields=None, exclude=None, header=True): | |
| """ | |
| This function returns an export csv action | |
| 'fields' and 'exclude' work like in django ModelForm | |
| 'header' is whether or not to output the column names as the first row | |
| """ | |
| def export_as_csv(modeladmin, request, queryset): |
| from flask import Flask, render_template, jsonify, request | |
| from threading import Timer, Thread | |
| from time import sleep | |
| app = Flask(__name__) | |
| @app.route("/api/<method>") | |
| def api(method): | |
| data = { |
| import json | |
| import hashlib | |
| import flask | |
| import flask.ext.sqlalchemy | |
| import flask.ext.restless | |
| from flask.ext.restless import ProcessingException | |
| app = flask.Flask(__name__) | |
| app.config['DEBUG'] = True | |
| app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////tmp/test.db' |
| import facebook | |
| import requests | |
| def some_action(post): | |
| """ Here you might want to do something with each post. E.g. grab the | |
| post's message (post['message']) or the post's picture (post['picture']). | |
| In this implementation we just print the post's created time. | |
| """ | |
| print post['created_time'] |
| <snippet> | |
| <tabTrigger>module</tabTrigger> | |
| <scope>source.python</scope> | |
| <description>Module</description> | |
| <content><![CDATA[# -*- coding: utf-8 -*- | |
| """ | |
| ${1:name} | |
| ${1/./~/g} |
| <mjpeg url="videoUrl"></mjpeg> |