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
Shader "Unlit/InfiniteGrid" | |
{ | |
Properties | |
{ | |
[Toggle] _WorldUV ("Use World Space UV", Float) = 1.0 | |
_GridScale ("Grid Scale", Float) = 1.0 | |
_GridBias ("Grid Bias", Float) = 0.5 | |
_GridDiv ("Grid Divisions", Float) = 10.0 | |
_BaseColor ("Base Color", Color) = (0,0,0,1) | |
_LineColor ("Line Color", Color) = (1,1,1,1) |
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 json | |
import os | |
import requests | |
from datetime import datetime, timezone | |
NOTIFICATIONS = 'https://api.github.com/notifications' | |
token = os.environ['GH_TOKEN'] | |
s = requests.Session() | |
s.headers.update({ |
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
Pretty print tables summarizing properties of tensor arrays in numpy, pytorch, jax, etc. | |
Now on pip! `pip install arrgh` https://github.com/nmwsharp/arrgh |
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
function print_isbits(f) | |
seen = Set() | |
MAX_ELE = 3 | |
function print_isbits(fname, fval::FTYPE, indent) where FTYPE | |
ftext = "$fname - $FTYPE\n" | |
print(" "^indent) | |
fbits = isbitstype(FTYPE) | |
if fbits |
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
using CImGui | |
using CImGui.GLFWBackend | |
using CImGui.OpenGLBackend | |
using CImGui.GLFWBackend.GLFW | |
using CImGui.OpenGLBackend.ModernGL | |
using AbstractPlotting | |
using GLMakie | |
import GLMakie: make_context_current, render_frame, to_native, Screen | |
# add ImGui rendering pass to GLMakie's rendering loop |
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
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 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
a4b.amazonaws.com | |
access-analyzer.amazonaws.com | |
account.amazonaws.com | |
acm-pca.amazonaws.com | |
acm.amazonaws.com | |
airflow-env.amazonaws.com | |
airflow.amazonaws.com | |
alexa-appkit.amazon.com | |
alexa-connectedhome.amazon.com | |
amazonmq.amazonaws.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
function f6(xs, ys) | |
lx, ly = length(xs), length(ys) | |
lxly = lx*ly | |
res = Array{Base.promote_eltype(xs, ys), 2}(lxly, 2) | |
ind = 1 | |
while ind<=lxly | |
@inbounds for x in xs | |
res[ind] = x | |
ind += 1 | |
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
// Creating a node graph editor for Dear ImGui | |
// Quick sample, not production code! | |
// This is quick demo I crafted in a few hours in 2015 showcasing how to use Dear ImGui to create custom stuff, | |
// which ended up feeding a thread full of better experiments. | |
// See https://github.com/ocornut/imgui/issues/306 for details | |
// Fast forward to 2023, see e.g. https://github.com/ocornut/imgui/wiki/Useful-Extensions#node-editors | |
// Changelog | |
// - v0.05 (2023-03): fixed for renamed api: AddBezierCurve()->AddBezierCubic(). |
NewerOlder