Skip to content

Instantly share code, notes, and snippets.

View joaopalmeiro's full-sized avatar
📊

João Palmeiro joaopalmeiro

📊
View GitHub Profile
@joaopalmeiro
joaopalmeiro / theme.py
Last active May 20, 2022 08:10
Sneak peek of the theme configuration.
# Sneak peek of the theme configuration:
def feedzai():
"""Feedzai theme (light theme)."""
return {
"config": {
# Guides
"axis": {
"domain": True,
"domainColor": COLORS["axis"],
@joaopalmeiro
joaopalmeiro / quickstart.py
Last active May 19, 2022 16:26
Quickstart
import altair as alt
alt.themes.enable("feedzai")
@joaopalmeiro
joaopalmeiro / setup.py
Created May 19, 2022 16:22
Entry point for Altair themes
from setuptools import setup
ENTRY_POINTS = {
"altair.vegalite.v4.theme": [
"feedzai = feedzai_altair_theme.theme:feedzai",
],
}
setup(name="feedzai-altair-theme", entry_points=ENTRY_POINTS)
@joaopalmeiro
joaopalmeiro / theme.py
Created May 19, 2022 16:18
Register and enable the Altair theme example
alt.themes.register("y_axis", y_axis)
alt.themes.enable("y_axis")
@joaopalmeiro
joaopalmeiro / theme.py
Last active May 19, 2022 16:15
Altair theme example
def y_axis():
return {
"config": {
"axisY": {
"domain": False,
"tickSize": 10,
"gridDash": [2, 4]
},
"view": {
"stroke": "transparent",
@joaopalmeiro
joaopalmeiro / README.md
Last active March 26, 2026 04:49
Metadata badges

Code style: black

@joaopalmeiro
joaopalmeiro / settings.json
Last active August 24, 2020 14:13
[Python] .vscode > settings.json
{
"editor.formatOnSave": true,
"python.formatting.provider": "black",
"python.linting.enabled": true,
"python.linting.lintOnSave": true,
"python.linting.flake8Enabled": true,
"python.linting.flake8Args": [
"--ignore=E501,W503",
# Source: https://gist.github.com/dgrtwo/eb7750e74997891d7c20
# Source: https://github.com/hadley/ggplot2/blob/master/R/geom-violin.r
# Last update: Wednesday, July 29, 2020 | ggplot2 3.3.2
library(ggplot2)
library(dplyr)
library(grid)
"%||%" <- function(a, b) {
@joaopalmeiro
joaopalmeiro / Histogram.js
Created January 15, 2020 13:29
Lifecycle Methods Wrapping basic skeleton.
class Histogram extends React.Component {
constructor(props) {
super(props);
this.histogramRef = React.createRef();
}
componentDidMount() {
this._createView();
}