Skip to content

Instantly share code, notes, and snippets.

View betodealmeida's full-sized avatar
💭
Code code code

Beto Dealmeida betodealmeida

💭
Code code code
View GitHub Profile
sql> SELECT assignees, labels, reactions, author_association FROM "https://api.github.com/repos/apache/superset/issues" WHERE assignees != '[]' AND labels != '[]' LIMIT 2;
assignees labels reactions author_association
---------------------------- ---------------------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------------------
["betodealmeida"] ["data:connect:drill"] [{"url": "https://api.github.com/repos/apache/superset/issues/27028/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0}] NONE
["mistercrunch", "rusackas"] ["P1"] [{"url":
import logging
from typing import Any, Dict, Generic, List
from flask_appbuilder import Model
from marshmallow import Schema, fields
from superset import security_manager
from superset.connectors.sqla.models import SqlaTable
from superset.datasets.dao import DatasetDAO
from superset.datasets.commands.exceptions import (
Loaded your LOCAL configuration at [/Users/beto/Projects/github/superset/superset_config.py]
Endpoint Methods Rule
------------------------------------------------ --------- -------------------------------------------------------------------------------------
AccessRequestsModelView.action_post POST /accessrequestsmodelview/action_post
AccessRequestsModelView.add GET, POST /accessrequestsmodelview/add
AccessRequestsModelView.delete GET, POST /accessrequestsmodelview/delete/<pk>
AccessRequestsModelView.edit GET, POST /accessrequestsmodelview/edit/<pk>
AccessRequestsModelView.list GET /accessrequestsmodelview/list/
AccessRequestsModelView.show GET /accessrequestsmodelview/show/<pk>
AlertView.list GET /alert/list/
@betodealmeida
betodealmeida / docker-superset_superset_config.py
Created June 6, 2022 20:54 — forked from PedroMartinSteenstrup/docker-superset_superset_config.py
Basic implementation of Snowflake pass-through authentication in Superset
# --------------------------------------
# Snowflake OAuth
# --------------------------------------
SNOWFLAKE_ACCOUNT = os.getenv('SNOWFLAKE_ACCOUNT') or None
if SNOWFLAKE_ACCOUNT:
SNOWFLAKE_SECURITY_INTEGRATION_CLIENT_ID = os.getenv('SNOWFLAKE_SECURITY_INTEGRATION_CLIENT_ID')
SNOWFLAKE_SECURITY_INTEGRATION_CLIENT_SECRET = os.getenv('SNOWFLAKE_SECURITY_INTEGRATION_CLIENT_SECRET')
SNOWFLAKE_OAUTH_AUTHORIZATION_ENDPOINT = f'https://{SNOWFLAKE_ACCOUNT}.snowflakecomputing.com/oauth/authorize'
// (*) All in the spirit of open-source and open-hardware
// Janost 2016 Sweden
 
// The Tiny-TS Touch Synthesizer
// https://janostman.wordpress.com/the-tiny-ts-diy-touch-synthesizer/
 
// Copyright 2016 DSP Synthesizers Sweden.
//
// Author: Jan Ostman
//
/* A MIDI pedal for the Critter & Guitari Organelle.
*
* An expression pedal sends CC numbers 21-24, depending on
* the switch pressed. A sustain pedal sends CC 25 to control
* the Aux button.
*/
#include <Bounce.h>
const int midiChannel = 15;
@betodealmeida
betodealmeida / asyncio_ssl_example.py
Created September 14, 2021 23:51 — forked from messa/asyncio_ssl_example.py
Python asyncio + SSL TCP client/server example
#!/usr/bin/env python3
import asyncio
import multiprocessing
import os
import ssl
from time import sleep
port = 9000
85c85
< <multisample url="..\..\..\..\..\Sounds\Lars Lentz\Vintage Synths\Noise\8track.wav"
---
> <multisample url="8track.talwav" urlRelativeToPresetDirectory="Lars\Lars Lentz Tape\8track.talwav"
96c96
< <multisample url="..\..\..\..\..\Sounds\Lars Lentz\Vintage Synths\Noise\reel2reel.wav"
---
> <multisample url="reel2reel.talwav" urlRelativeToPresetDirectory="Lars\Lars Lentz Tape\reel2reel.talwav"
import re
def is_prime(n):
return not re.match(r'^.?$|^(..+?)\1+$', '1'*n)
/*
1. Download and run https://raw.githubusercontent.com/esp8266/Arduino/master/libraries/ESP8266WiFi/examples/BearSSL_CertStore/certs-from-mozilla.py
2. Make sure the `certs.ar` file is in the `data/` directory in your project.
3. Download and install ESP8266LittleFS (see https://arduino-esp8266.readthedocs.io/en/latest/filesystem.html#uploading-files-to-file-system)
4. Run Tools > ESP8266 LittleFS Data Upload
5. Upload this sketch
/***************************************************
Adafruit MQTT Library ESP8266 Example