使用最新Raspbian镜像,联网进行安装。
安装 WiringPi
cd ~
git clone git://git.drogon.net/wiringPi
cd wiringPi
./build
// https://stackoverflow.com/questions/15095909/from-rgb-to-hsv-in-opengl-glsl | |
vec3 rgb2hsv(vec3 c) { | |
vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); | |
vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g)); | |
vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r)); | |
float d = q.x - min(q.w, q.y); | |
float e = 1.0e-10; | |
return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x); | |
} |
# __ __ | |
# / \ / \ | |
# \__/ | | | |
# __ | | __ | |
# / \______| | ________ ________ __| |__ ________ | |
# | ______ | / __ \ / _____| |__ __| / _____| | |
# | | \__/ | / \ | | |_____ | | | |_____ | |
# | | __ | | | | \_____ \ | | \_____ \ | |
# | | / \ | \__/ | _____| | | |__ _____| | | |
# \__/ \__/ \________/ |________/ \_____| |________/ |
#!/bin/bash | |
# https://asciinema.org/a/6LZefsbvLjgsuwQHOnQsBEaSj | |
IF=notset | |
OF=notset | |
BS=128M | |
CURDIR=$(dirname $(realpath -s $0)) | |
SCRIPT=`basename "$0"` | |
if [[ ! -f /usr/bin/pv ]]; then | |
echo "pv is not installed. Please install pv and try again" |
#!/usr/bin/env python | |
import math | |
import pygame | |
import random | |
import rtmidi | |
from rtmidi.midiconstants import * | |
import time | |
TAU = 2 * math.pi |
Shader "ShadowShader" { | |
Properties{ | |
_Color("Main Color", Color) = (1,1,1,1) | |
_MainTex("Base (RGB)", 2D) = "white" {} | |
_Cutoff("Cutout", Range(0,1)) = 1.0 | |
} | |
SubShader{ | |
Pass{ | |
Alphatest Greater[_Cutoff] SetTexture[_MainTex] |
//@version=4 | |
// CIRCLES: | |
// - LITTLE: They appear at all WaveTrend wave crossings | |
// - GREEN: The wavetrend waves are at the oversold level and have crossed up (bullish) | |
// - RED: The wavetrend waves are at the overbought level and have crossed down (bearish) | |
// - PURPLE: Appear when a bullish or bearish divergence is formed and WaveTrend waves crosses at overbought and oversold points | |
// - GOLD: When RSI is below 20, WaveTrend waves are below or equal to -80 and have crossed up (DONT BUY WHEN GOLD CIRCLE APPEAR) | |
// - None of these circles are certain signs to trade. It is only information that can help you. | |
// | |
// I am not an expert trader or know how to program pine script as such, in fact it is my first indicator only to study and all the code is copied and modified from other codes that are published in TradingView. |
/* open up chrome dev tools (Menu > More tools > Developer tools) | |
* go to network tab, refresh the page, wait for images to load (on some sites you may have to scroll down to the images for them to start loading) | |
* right click/ctrl click on any entry in the network log, select Copy > Copy All as HAR | |
* open up JS console and enter: var har = [paste] | |
* (pasting could take a while if there's a lot of requests) | |
* paste the following JS code into the console | |
* copy the output, paste into a text file | |
* open up a terminal in same directory as text file, then: wget -i [that file] | |
*/ |