This file contains 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
Originall From: Posted 2015-05-29 http://ubwg.net/b/full-list-of-ffmpeg-flags-and-options | |
This is the complete list that’s outputted by ffmpeg when running ffmpeg -h full. | |
usage: ffmpeg [options] [[infile options] -i infile]… {[outfile options] outfile}… | |
Getting help: | |
-h — print basic options | |
-h long — print more options | |
-h full — print all options (including all format and codec specific options, very long) |
This file contains 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
(defn computer-down? [{{computer-y :y} :computer | |
{ball-y :y} :ball player-height :player-height :as state}] | |
(and (> (- computer-y 20) ball-y) (>= (- computer-y (/ player-height 2)) 0))) | |
;; vs. | |
(defn computer-down? [{:keys [ball computer] :as st}] | |
(let [cy (:y computer)] | |
(and (> (- cy 20) (:y ball)) | |
(>= (- cy (/ (:player-height st) 2)) 0)))) |
This file contains 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
(ns lenskit-hello.core | |
(:require [clojure.java.io :as io]) | |
(:import [org.grouplens.lenskit | |
ItemRecommender ItemScorer Recommender RecommenderBuildException] | |
[org.grouplens.lenskit.baseline | |
BaselineScorer ItemMeanRatingItemScorer UserMeanBaseline | |
UserMeanItemScorer] | |
[org.grouplens.lenskit.core | |
LenskitConfiguration LenskitRecommender] | |
[org.grouplens.lenskit.cursors Cursors] |
This file contains 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
options("repos"="http://cran.us.r-project.org") | |
library("rgdal") | |
myPolygons = readOGR("/path/to/file",layer="mylayer") | |
alpha=0.75 | |
library(alphahull) | |
pts = spsample(myPolygons, n=1000, type="regular") | |
x.as = ashape(coordinates(pts),alpha=alpha) | |
# need to convert x.as to a SpatialPolygon | |
# code to convert ahull into sp: |
This file contains 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
(ns hs-js-clj.core) | |
(def foo {:bar 1}) | |
(defn fooify [n] (str "foo" n)) | |
(defn commaify [[x y]] | |
(str x ", " y)) |
This file contains 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
console.log("hello"); | |
function LazySeq(head, tail) { | |
this.head = head; // value | |
this.tail = tail; // thunk || null | |
} | |
function ints(n) { | |
return new LazySeq(n, function() { return ints(n+1); }); | |
} |
This file contains 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
var aliens = [{}, {}, {}]; | |
var aliensCollidingWithPlayer = []; | |
for (var i = 0; i < aliens.length; i++) { | |
if(colliding(alien[i], player)) { // is colliding current tick | |
var collidingInPreviousTick = false; | |
for (var j = 0; j < aliensCollidingWithPlayer.length; j++) { | |
if (aliens[i] === aliensCollidingWithPlayer[j]) { | |
collidingInPreviousTick = true; | |
break; |
This file contains 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
four primitives: run*, ==, conde, fresh | |
(run* (q) | |
(== q #t)) | |
; for what values of q is q equal to true? | |
answer: q must also be #t, so | |
'(#t) ; answer comes back in a list |
This file contains 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
# time | |
# ==== | |
macro time(ex) | |
quote | |
local t0 = time_ns() | |
local val = $(esc(ex)) | |
local t1 = time_ns() | |
println("elapsed time: ", (t1-t0)/1e9, " seconds") | |
val |