Example of setting up Grafana to read from Firefly. See https://www.reddit.com/r/FireflyIII/comments/nogrl5 for context.
This file contains hidden or 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 logging | |
| from dataclasses import dataclass | |
| from typing import Union, List | |
| logger = logging.getLogger(__name__) | |
| class Validations: |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
| from collections import namedtuple | |
| class Money(namedtuple('Money', ['amount', 'currency'])): | |
| def add(self, amount): | |
| return Money(self.amount + amount, self.currency) | |
| m = Money(20, 'USD') | |
| print(m) | |
| # Money(amount=20, currency='USD') |
This file contains hidden or 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
| # -*- coding: utf-8 -*- | |
| import requests | |
| from io import BytesIO, SEEK_SET, SEEK_END | |
| class ResponseStream(object): | |
| def __init__(self, request_iterator): | |
| self._bytes = BytesIO() | |
| self._iterator = request_iterator |
This file contains hidden or 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
| # http://docs.python-requests.org/en/master/api/ | |
| import requests | |
| class RequestsApi: | |
| def __init__(self, base_url, **kwargs): | |
| self.base_url = base_url | |
| self.session = requests.Session() | |
| for arg in kwargs: | |
| if isinstance(kwargs[arg], dict): | |
| kwargs[arg] = self.__deep_merge(getattr(self.session, arg), kwargs[arg]) |
A curated list of AWS resources to prepare for the AWS Certifications
A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.
This file contains hidden or 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
| { "path": "/content/geometrixx/my-first-jinja-page", | |
| "properties": [ | |
| { "name": "jcr:primaryType", | |
| "value": "cq:Page" }], | |
| "nodes": [ | |
| { "path": "jcr:content", | |
| "properties": [ | |
| { "name": "jcr:primaryType", | |
| "value": "cq:PageContent"}, |
This file contains hidden or 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
| class GAEHandler(logging.Handler): | |
| """ | |
| Logging handler for GAE DataStore | |
| """ | |
| def emit(self, record): | |
| from google.appengine.ext import db | |
| class Log(db.Model): | |
| name = db.StringProperty() |
