Skip to content

Instantly share code, notes, and snippets.

View RocketRene's full-sized avatar

René Kuhn RocketRene

  • Berlin
View GitHub Profile
@sammchardy
sammchardy / binance_get_historical_klines.py
Last active March 12, 2025 05:53
Get historical Klines from Binance
# uses the date_to_milliseconds and interval_to_milliseconds functions
# https://gist.github.com/sammchardy/3547cfab1faf78e385b3fcb83ad86395
# https://gist.github.com/sammchardy/fcbb2b836d1f694f39bddd569d1c16fe
from binance.client import Client
import time
def get_historical_klines(symbol, interval, start_str, end_str=None):
"""Get Historical Klines from Binance
@alee
alee / views.py
Last active October 18, 2024 14:20
example Django view function that can be used for Discourse SSO, i.e., Discourse delegates User authentication to Django
import base64
import hmac
import hashlib
from urllib import parse
from django.contrib.auth.decorators import login_required
from django.http import HttpResponseBadRequest, HttpResponseRedirect
from django.conf import settings
@login_required