###Tested with:
- Spark 2.0.0 pre-built for Hadoop 2.7
- Mac OS X 10.11
- Python 3.5.2
Use s3 within pyspark with minimal hassle.
-- Create a group | |
CREATE ROLE readaccess; | |
-- Grant access to existing tables | |
GRANT USAGE ON SCHEMA public TO readaccess; | |
GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess; | |
-- Grant access to future tables | |
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readaccess; |
require "http/server" | |
SOCKETS = [] of HTTP::WebSocketHandler::WebSocketSession | |
ws_handler = HTTP::WebSocketHandler.new do |socket| | |
puts "Socket opened" | |
SOCKETS << socket | |
socket.on_message do |message| | |
SOCKETS.each { |socket| socket.send "Echo back from server: #{message}" } |
#!/usr/bin/env bash | |
# -r 60: 60 FPS | |
# -y: rewrite output file | |
# -start_number 11555: first frame number | |
# -i 'G%07d.JPG': file format | |
# -vf "crop=h=2250": video filter to crop input frame height from 3000 to 2250 (which will be eventually downscaled to 720) | |
# -c:v libx264: video codec x264 | |
# -crf 20: x264 encoding quality (less = better) | |
# -s 1280x720: output size |
Finally, Simple Form support Boostrap 3. 👏
But I found it still dosen't support some components in Bootstrap 3. Or may be in the future. But I can't wait, so I find a solution to support them. It was inspired by heartcombo/simple_form#531 (comment) .
This is a final solution and I used in my project.
#!/usr/bin/expect -f | |
# | |
# VIPAccess.exp | |
# | |
# Command-line emulation of Symantec's VIP Access software token. | |
# Usage: | |
# ./VIPAccess.exp [v] | |
# If the "v" argument (or any argument) is specified, verbose output | |
# will be produced on stderr. The OTP value will be output on stdout. | |
# |
# This second example runs Trueskill on a tennis tournament, the Australian Open. | |
# Note that actual computation is commented out as it takes about ~40 seconds to | |
# update skill ratings over 127 matches. | |
library(trueskill) | |
# Data format of ausopen2012 is: Player, Opponent, Margin, Round, WRank, LRank | |
data("ausopen2012") | |
# create match_id in order to reshape |
package main | |
import ( | |
"log" | |
"net" | |
"os" | |
"os/signal" | |
"sync" | |
"syscall" | |
"time" |
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
build_package_patched() { | |
# These three patches are included when RVM builds REE | |
cd source | |
wget 'https://github.com/wayneeseguin/rvm/raw/master/patches/ree/1.8.7/tcmalloc.patch' | |
wget 'https://github.com/wayneeseguin/rvm/raw/master/patches/ree/1.8.7/stdout-rouge-fix.patch' | |
wget 'https://github.com/wayneeseguin/rvm/raw/master/patches/ree/1.8.7/no_sslv2.diff' | |
patch -p1 < tcmalloc.patch | |
patch -p1 < stdout-rouge-fix.patch | |
patch -p1 < no_sslv2.diff | |
cd .. |