Skip to content

Instantly share code, notes, and snippets.

View trevery's full-sized avatar

火山 trevery

View GitHub Profile
@trevery
trevery / README.md
Created October 24, 2022 09:47 — forked from maboloshi/README.md
[Mac下配置Aria2] #macOS #aria2

Mac下配置Aria2

安装和设置 Aria2

# 使用 Homebrew 安装 aria2
brew install aria2

# 创建配置文件aria2.conf和空对话文件aria2.session
mkdir ~/.aria2 && cd ~/.aria2
touch aria2.conf
@trevery
trevery / hadoop_spark_osx
Last active September 9, 2020 07:38 — forked from cjzamora/hadoop_spark_osx
Hadoop + Spark installation (OSX)
Source: http://datahugger.org/datascience/setting-up-hadoop-v2-with-spark-v1-on-osx-using-homebrew/
This post builds on the previous setup Hadoop (v1) guide, to explain how to setup a single node Hadoop (v2) cluster with Spark (v1) on OSX (10.9.5).
Apache Hadoop is a framework that allows for the distributed processing of large data sets across clusters of computers using simple programming models. It is designed to scale up from single servers to thousands of machines, each offering local computation and storage. Rather than rely on hardware to deliver high-availability, the library itself is designed to detect and handle failures at the application layer, so delivering a highly-available service on top of a cluster of computers, each of which may be prone to failures. The Apache Hadoop framework is composed of the following core modules:
HDFS (Distributed File System): a distributed file-system that stores data on commodity machines, providing very high aggregate bandwidth across the cluster.
YARN (Yet A
@trevery
trevery / miniconda_on_rpi.md
Created June 2, 2018 06:57 — forked from simoncos/miniconda_on_rpi.md
Install Miniconda 3 on Raspberry Pi
@trevery
trevery / flip.pde
Created May 20, 2018 16:09 — forked from shiffman/flip.pde
Flipping Video in Processing
import processing.video.*;
Capture cam;
void setup() {
size(640, 480);
cam = new Capture(this, 640, 480);
cam.start();
}
@trevery
trevery / edges.py
Created May 22, 2017 02:05 — forked from sight-machine/edges.py
A simple Canny edge detector demo using SimpleCV.
# Make a function that does a half and half image.
def halfsies(left,right):
result = left
# crop the right image to be just the right side.
crop = right.crop(right.width/2.0,0,right.width/2.0,right.height)
# now paste the crop on the left image.
result = result.blit(crop,(left.width/2,0))
# return the results.
return result
# Load an image from imgur.
@trevery
trevery / binarize.py
Created May 22, 2017 01:26 — forked from sight-machine/binarize.py
Image threshold with a side-by-side view using SimpleCV.
from SimpleCV import Image, Color, Display
# Make a function that does a half and half image.
def halfsies(left,right):
result = left
# crop the right image to be just the right side.
crop = right.crop(right.width/2.0,0,right.width/2.0,right.height)
# now paste the crop on the left image.
result = result.blit(crop,(left.width/2,0))
# return the results.
@trevery
trevery / 0_reuse_code.js
Created May 15, 2017 11:58
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console