Skip to content

Instantly share code, notes, and snippets.

View Victornovikov's full-sized avatar
💭

Victor Victornovikov

💭
  • Moscow / San Francisco
View GitHub Profile
@Victornovikov
Victornovikov / math_for_ml.md
Last active December 18, 2020 03:08
Math for ML
@yig
yig / matrix derivatives.txt
Last active December 1, 2023 19:39
matrix derivatives via frobenius norm
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
@yi-jiayu
yi-jiayu / autoreplier.py
Last active January 27, 2024 11:09
Automatic replies for Telegram (Updated for Telethon 1.6.2)
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
@daviderestivo
daviderestivo / drestivo-org-download-method.el
Created August 30, 2017 12:07
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.
(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
@timvieira
timvieira / simple-backprop.py
Last active May 14, 2022 04:32
Simple example of manually performing "automatic" differentiation.
"""
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)
@adham90
adham90 / spacemacs-keybindings
Last active April 5, 2024 14:24
spacemacs keybindings that i need to learn
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 |
@vasanthk
vasanthk / System Design.md
Last active May 4, 2024 08:51
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. 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?
@crittelmeyer
crittelmeyer / vim_cheatsheet.md
Last active January 25, 2024 20:15
vim cheatsheet
@brijeshb42
brijeshb42 / app.py
Last active September 25, 2020 20:16
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
@soheilhy
soheilhy / nginxproxy.md
Last active March 22, 2024 08:54
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers