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
#!/bin/bash | |
func install_yamlfmt { | |
# Check the machine architecture | |
arch=$(uname -m) | |
# Set the URL based on the machine architecture | |
if [[ $arch == "x86_64" ]]; then | |
url="https://github.com/google/yamlfmt/releases/download/v0.10.0/yamlfmt_0.10.0_Linux_x86_64.tar.gz" | |
elif [[ $arch == "arm64" ]]; then |
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
#!/bin/bash | |
function git_clean_local_branches { | |
OPTION="-d"; | |
if [[ "$1" == "-f" ]]; then | |
echo "WARNING! Removing with force"; | |
OPTION="-D"; | |
fi; | |
TO_REMOVE=`git branch -r | awk "{print \\$1}" | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk "{print \\$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
const myRadarChart = new Chart(ctx, { | |
type: 'radar', | |
data: data, | |
options: options | |
}); |
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
{ | |
"$schema": "https://vega.github.io/schema/vega-lite/v4.json", | |
"width": 400, | |
"data": {"url": "data/ohlc.json"}, | |
"encoding": { | |
"x": { | |
"field": "date", | |
"type": "temporal", | |
"title": "Date" | |
}, |
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
<VictoryChart | |
theme={VictoryTheme.material} | |
domainPadding={{ x: 25 }} | |
scale={{ x: "time" }} | |
> | |
<VictoryAxis tickFormat={(t) => `${t.getDate()}/${t.getMonth()}`}/> | |
<VictoryAxis dependentAxis/> | |
<VictoryCandlestick | |
candleColors={{ positive: "#5f5c5b", negative: "#c43a31" }} | |
data={sampleDataDates} |
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
import { Chart } from '@antv/g2'; | |
const data = [ | |
{country: "China", population: 131744}, | |
{country: "India", population: 104970}, | |
{country: "US", population: 29034}, | |
]; | |
const chart = new Chart({ container: 'container', autoFit: true, height: 500 }); | |
chart.data(data); |
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
<ReactRough> | |
<Rectangle x={15} y={15} width={90} height={80} fill="red" /> | |
</ReactRough> |
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
import { Calendar } from '@nivo/calendar'; | |
<Calendar | |
data={[ | |
{ "day": "2016-02-05", "value": 397 }, | |
{ "day": "2015-09-17", "value": 283 }, | |
]} | |
from="2015-04-01" | |
to="2016-12-12" | |
emptyColor="#eeeeee" |
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
import {Deck} from '@deck.gl/core'; | |
import {ScatterplotLayer} from '@deck.gl/layers'; | |
const INITIAL_VIEW_STATE = { | |
latitude: 37.8, | |
longitude: -122.45, | |
zoom: 15 | |
}; | |
const deckgl = new Deck({ |
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
option = { | |
xAxis: { | |
data: ['2017-10-24', '2017-10-25', '2017-10-26', '2017-10-27'] | |
}, | |
yAxis: {}, | |
series: [{ | |
type: 'candlestick', | |
data: [ | |
[20, 30, 10, 35], | |
[40, 35, 30, 55], |
NewerOlder