Skip to content

Instantly share code, notes, and snippets.

View teury's full-sized avatar

Teury Diaz teury

View GitHub Profile
@marty0678
marty0678 / example_usage.py
Created March 8, 2024 21:57
Django Rest Framework Base Model CRUD Class
# Views
class UserProfileViewSet(BaseModelViewSet):
"""View set for the UserProfile."""
ENABLE_LIST = True
ENABLE_RETRIEVE = True
ENABLE_PARTIAL_UPDATE = True
ENABLE_PAGINATION = True
LIST_CACHE_KEY = "users:user-profiles-list"
@doctorpangloss
doctorpangloss / repetition_algorithm.ipynb
Last active November 23, 2023 19:13
Supermemo 2 Algorithm, Unobscured (Python 3)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@clintonb
clintonb / backends.py
Last active May 2, 2022 16:26
python-social-auth OpenID Connect Backend
"""
This file contains Django authentication backends. For more information visit
https://docs.djangoproject.com/en/dev/topics/auth/customizing/.
"""
from calendar import timegm
from datetime import datetime
from django.conf import settings
import jwt
from social.backends.oauth import BaseOAuth2
@junstrix
junstrix / Nginx_uwsig_django.md
Last active February 11, 2022 09:32
Nginx, Uwsgi, Virtualenv and Django
http://sugg.search.yahoo.net/sg/?output=jsonp&nresults=10&command=django
http://sugg.search.yahoo.net/sg/?output=json&nresults=10&command=django
http://sugg.search.yahoo.net/sg/?output=xml&nresults=10&command=django