This is a WIP of a cheat-sheet that I will finish Eventually™
Mapping of the shader types to Heaps types:
Float = Float
Int = Int
Bool = Bool| :root { | |
| --bg-color: #ffffff; | |
| --font-color: #000000; | |
| /* highest contrast colors | |
| for light and dark themes */ | |
| --red: #ec0000; | |
| --green: #008900; | |
| --blue: #5f5fff; | |
| --gray: #757575; | |
| } |
| from math import cos, sin, pi | |
| from enum import IntFlag | |
| import numpy as np | |
| # OUTPUT : | |
| # | |
| # Walkable space : | |
| # [[ True True True True True] | |
| # [ True False False False True] | |
| # [ True False False False True] |
| // When creating shaders for Universal Render Pipeline you can you the ShaderGraph which is super AWESOME! | |
| // However, if you want to author shaders in shading language you can use this teamplate as a base. | |
| // Please note, this shader does not necessarily match perfomance of the built-in URP Lit shader. | |
| // This shader works with URP 7.1.x and above | |
| Shader "Universal Render Pipeline/Custom/Physically Based Example" | |
| { | |
| Properties | |
| { | |
| // Specular vs Metallic workflow | |
| [HideInInspector] _WorkflowMode("WorkflowMode", Float) = 1.0 |
| /* | |
| * https://en.wikipedia.org/wiki/Tree_(data_structure) | |
| */ | |
| private static List<GameObject> Traverse(GameObject parent, Type type) | |
| { | |
| List<GameObject> children = new List<GameObject>(); | |
| foreach (Transform node in parent.transform) | |
| children.Add(node.gameObject); |
| import time | |
| import numpy as np | |
| from numpy.fft import fft2, ifft2 | |
| from matplotlib import pyplot, animation | |
| def fft_convolve2d(board, kernal): | |
| board_ft = fft2(board) | |
| kernal_ft = fft2(kernal) | |
| height, width = board_ft.shape |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using UnityEngine; | |
| namespace ZS.Tools | |
| { | |
| /// <summary> | |
| /// Provides means to deep-copy a TerrainData object because Unitys' built-in "Instantiate" method |
| PoS(Ja) | PoS (En) | PoS (En) - descriptions |
|---|---|---|
| 代名詞 | Pron | pronoun |
| 副詞 | Adv | adverb |
| 助動詞 | Aux | auxiliary_verb |
| 助詞-係助詞 | P.bind | particle(binding) |
| 助詞-副助詞 | P.adv | particle(adverbial) |
| 助詞-接続助詞 | P.conj | particle(conjunctive) |
| 助詞-格助詞 | P.case | particle(case) |
| 助詞-準体助詞 | P.nom | particle(nominal) |
| In [29]: my_sub = db.session.query(TestModel.name, func.count(TestModel.id).label('count')).group_by(TestModel.name).subquery() | |
| In [30]: db.session.query(TestModel, my_sub.c.count).outerjoin(my_sub, TestModel.name==my_sub.c.name).all() | |
| Out[30]: [(<1: Bob>, 1), (<2: Alice>, 2), (<3: Alice>, 2)] |
Magic words:
psql -U postgresSome interesting flags (to see all, use -h or --help depending on your psql version):
-E: will describe the underlaying queries of the \ commands (cool for learning!)-l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)