This file contains 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 django.http import HttpResponseServerError | |
import json | |
import traceback | |
import sys | |
class JSONException(object): | |
''' | |
Return all exceptions as a JSON object. | |
''' |
This file contains 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
# Packages and modules are imported to the scope using the import statement. | |
# If you wanted just a particular object from a module/package you can use | |
# the from <module> import <object> | |
import sys | |
import requests | |
# There are no constants in Python, still we can use a naming convention to | |
# imply that to the user of a library. | |
BASE_URL = "https://api.github.com" |
This file contains 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
;; Taken from https://andreyor.st/posts/2020-05-10-making-emacs-tabs-look-like-in-atom/ | |
;; https://github.com/andreyorst/dotfiles/blob/740d346088ce5a51804724659a895d13ed574f81/.config/emacs/README.org#tabline | |
(defun my/set-tab-theme () | |
(let ((bg (face-attribute 'mode-line :background)) | |
(fg (face-attribute 'default :foreground)) | |
(hg (face-attribute 'default :background)) | |
(base (face-attribute 'mode-line :background)) | |
(box-width (/ (line-pixel-height) 4))) | |
(set-face-attribute 'tab-line nil |