duplicates = multiple editions
A Classical Introduction to Modern Number Theory, Kenneth Ireland Michael Rosen
A Classical Introduction to Modern Number Theory, Kenneth Ireland Michael Rosen
| from flask import Flask, make_response | |
| app = Flask(__name__) | |
| @app.route("/simple.png") | |
| def simple(): | |
| import datetime | |
| import StringIO | |
| import random | |
| from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas |
| "Plot a PNG using matplotlib in a web request, using Flask." | |
| # Install dependencies, preferably in a virtualenv: | |
| # | |
| # pip install flask matplotlib | |
| # | |
| # Run the development server: | |
| # | |
| # python app.py | |
| # |
| # ipak function: install and load multiple R packages. | |
| # check to see if packages are installed. Install them if they are not, then load them into the R session. | |
| ipak <- function(pkg){ | |
| new.pkg <- pkg[!(pkg %in% installed.packages()[, "Package"])] | |
| if (length(new.pkg)) | |
| install.packages(new.pkg, dependencies = TRUE) | |
| sapply(pkg, require, character.only = TRUE) | |
| } |
| \documentclass[11pt]{scrartcl} | |
| \usepackage{selinput} | |
| \usepackage[margin=2cm]{geometry} | |
| \usepackage{enumitem,varwidth} | |
| \usepackage[svgnames]{xcolor} | |
| \usepackage{tikz} | |
| \usetikzlibrary{shapes.geometric} | |
| \usepackage{lmodern} | |
| \parindent0em |
| <script\x20type="text/javascript">javascript:alert(1);</script> | |
| <script\x3Etype="text/javascript">javascript:alert(1);</script> | |
| <script\x0Dtype="text/javascript">javascript:alert(1);</script> | |
| <script\x09type="text/javascript">javascript:alert(1);</script> | |
| <script\x0Ctype="text/javascript">javascript:alert(1);</script> | |
| <script\x2Ftype="text/javascript">javascript:alert(1);</script> | |
| <script\x0Atype="text/javascript">javascript:alert(1);</script> | |
| '`"><\x3Cscript>javascript:alert(1)</script> | |
| '`"><\x00script>javascript:alert(1)</script> | |
| <img src=1 href=1 onerror="javascript:alert(1)"></img> |
| var request = require('request'); | |
| var unzip = require('unzip'); | |
| var csv2 = require('csv2'); | |
| request.get('http://s3.amazonaws.com/alexa-static/top-1m.csv.zip') | |
| .pipe(unzip.Parse()) | |
| .on('entry', function (entry) { | |
| entry.pipe(csv2()).on('data', console.log); | |
| }) | |
| ; |
| CB_color_cycle = ['#377eb8', '#ff7f00', '#4daf4a', | |
| '#f781bf', '#a65628', '#984ea3', | |
| '#999999', '#e41a1c', '#dede00'] |
| import theano | |
| import theano.tensor as T | |
| import numpy as np | |
| import cPickle | |
| import random | |
| import matplotlib.pyplot as plt | |
| class RNN(object): | |
| def __init__(self, nin, n_hidden, nout): |
| ### DATA SECTION | |
| library(data.table) | |
| ## Read data with 'data.table::fread' | |
| input <- fread("wu03ew_v1.csv", select = 1:3) | |
| setnames(input, 1:3, new = c("origin", "destination","total")) | |
| ## Coordinates | |
| centroids <- fread("msoa_popweightedcentroids.csv") | |
| ## 'Code' is the key to be used in the joins |