-
A good collection of links on matrix derivatives https://gist.github.com/yig/c1959ce997f1d2fd6f3f982cb482e060
-
A gentle intro. This series gives an overview of gradient, Jacobian and importance of chain rule for NN
-
https://www.lesswrong.com/s/nMGrhBYXWjPhZoyNL/p/KKwv9kcQz29vqPLAD
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
Matrix derivatives via Frobenius norm | |
# Automatic matrix derivatives: http://www.matrixcalculus.org/ | |
# A good primer on basic matrix calculus: https://atmos.washington.edu/~dennis/MatrixCalculus.pdf | |
# The Matrix Reference Manual: http://www.ee.ic.ac.uk/hp/staff/dmb/matrix/intro.html#Intro | |
# Trying to understand the derivative of the inverse: https://math.stackexchange.com/questions/1471825/derivative-of-the-inverse-of-a-matrix | |
# Derivative of the pseudoinverse: | |
https://math.stackexchange.com/questions/2179160/derivative-of-pseudoinverse-with-respect-to-original-matrix | |
https://mathoverflow.net/questions/25778/analytical-formula-for-numerical-derivative-of-the-matrix-pseudo-inverse |
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 time | |
from telethon import TelegramClient, events | |
# sample API_ID from https://github.com/telegramdesktop/tdesktop/blob/f98fdeab3fb2ba6f55daf8481595f879729d1b84/Telegram/SourceFiles/config.h#L220 | |
# or use your own | |
api_id = 17349 | |
api_hash = '344583e45741c457fe1862106095a5eb' | |
# fill in your own details here |
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
(defun drestivo/org-download-method (link) | |
"This is an helper function for org-download. | |
It creates an \"./image\" folder within the same directory of the org file. | |
Images are separated inside that image folder by additional folders one per | |
org file. | |
More info can be found here: https://github.com/abo-abo/org-download/issues/40. | |
See the commit message for an example: | |
https://github.com/abo-abo/org-download/commit/137c3d2aa083283a3fc853f9ecbbc03039bf397b" | |
(let ((filename | |
(file-name-nondirectory |
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
""" | |
Simple example of manually performing "automatic" differentiation | |
""" | |
import numpy as np | |
from numpy import exp, sin, cos | |
def f(x, with_grad=False): | |
# Need to cache intermediates from forward pass (might not use all of them). | |
a = exp(x) |
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
SPC s c remove highlight | |
**** Files manipulations key bindings | |
Files manipulation commands (start with ~f~): | |
| Key Binding | Description | | |
|-------------+----------------------------------------------------------------| | |
| ~SPC f c~ | copy current file to a different location | | |
| ~SPC f C d~ | convert file from unix to dos encoding | | |
| ~SPC f C u~ | convert file from dos to unix encoding | |
Picking the right architecture = Picking the right battles + Managing trade-offs
- Clarify and agree on the scope of the system
- User cases (description of sequences of events that, taken together, lead to a system doing something useful)
- Who is going to use it?
- How are they going to use it?
As configured in my dotfiles
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 os | |
import json | |
import datetime | |
from flask import Flask, url_for, redirect, \ | |
render_template, session, request | |
from flask.ext.sqlalchemy import SQLAlchemy | |
from flask.ext.login import LoginManager, login_required, login_user, \ | |
logout_user, current_user, UserMixin | |
from requests_oauthlib import OAuth2Session |
NewerOlder