<details>
<summary>Click me</summary>
### Heading
1. Foo
2. Bar
* Baz
* Qux
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
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks. | |
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/) | |
(() => { | |
const SHOW_SIDES = false; // color sides of DOM nodes? | |
const COLOR_SURFACE = true; // color tops of DOM nodes? | |
const COLOR_RANDOM = false; // randomise color? | |
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com) | |
const MAX_ROTATION = 180; // set to 360 to rotate all the way round | |
const THICKNESS = 20; // thickness of layers | |
const DISTANCE = 10000; // ¯\\_(ツ)_/¯ |
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
def one_layer_backward_pass(curr_grad, curr_weight, curr_bias, curr_out, prev_act, activation='R'): | |
#how many sample in previous activations? | |
num = prev_act.shape[1] | |
#find out what we are differentiating | |
if activation is 'R': | |
d_act_func = activations.d_relu | |
elif activation is 'S': | |
d_act_func = activations.d_sigmoid |
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
local ls = require('luasnip') | |
local M = {} | |
function M.expand_or_jump() | |
if ls.expand_or_jumpable() then | |
ls.expand_or_jump() | |
end | |
end |
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
import torch | |
from torch import nn | |
from torch.optim.sgd import sgd | |
import gc | |
import objgraph | |
import weakref | |
def all(): | |
# Only a subset of the args you could have | |
def set_sgd_hook(mod, p, lr, weight_decay, momentum): |
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
Lua 33 hrs 6 mins █████████████▎░░░░░░░ 63.4% | |
TypeScript 7 hrs 43 mins ███░░░░░░░░░░░░░░░░░░ 14.8% | |
Markdown 2 hrs 57 mins █▏░░░░░░░░░░░░░░░░░░░ 5.7% | |
JavaScript 2 hrs 41 mins █░░░░░░░░░░░░░░░░░░░░ 5.2% | |
Other 2 hrs 6 mins ▊░░░░░░░░░░░░░░░░░░░░ 4.0% |
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
namespace OnlineStoreBackend | |
{ | |
public interface IPersistenceManager | |
{ | |
bool UsernameExists(string username); | |
void SaveAccount(string username, string password); | |
} | |
} |