create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
""" Trains an agent with (stochastic) Policy Gradients on Pong. Uses OpenAI Gym. """ | |
import numpy as np | |
import cPickle as pickle | |
import gym | |
# hyperparameters | |
H = 200 # number of hidden layer neurons | |
batch_size = 10 # every how many episodes to do a param update? | |
learning_rate = 1e-4 | |
gamma = 0.99 # discount factor for reward |
#' Connect and query Imapala via SSH and Impala-shell | |
#' @param query SQL query to run | |
#' @param host server hostname or IP | |
#' @param log enable or disable logging of debug/trace messages | |
#' @return data.table object | |
#' @export | |
query_impala <- function(query, host = 'localhost', log = require(futile.logger)) { | |
## measure time of query | |
timer <- proc.time() |
#!/usr/bin/env bash | |
# Compress a pdf using gs. | |
# Requires in input the compression type, the name of the file to compress and the name of the output file (in this order). | |
# Example: | |
# pdfcompress screen MyHighResDocument.pdf MyLowResDocument.pdf | |
# | |
# Possible values for compression types are: | |
# screen , selects low-resolution output similar to the Acrobat Distiller “Screen Optimized” setting. | |
# ebook , selects medium-resolution output similar to the Acrobat Distiller “eBook” setting. | |
# printer , selects output similar to the Acrobat Distiller “Print Optimized” setting. |
{%- extends 'full.tpl' -%} | |
{% block input_group -%} | |
<div class="input_hidden"> | |
{{ super() }} | |
</div> | |
{% endblock input_group %} | |
{%- block header -%} | |
{{ super() }} |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
"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 | |
# |
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 |