Skip to content

Instantly share code, notes, and snippets.

View kenorb's full-sized avatar
💭
The Consciousness Has Shifted...The Awakening Has Begun

Rafal W. kenorb

💭
The Consciousness Has Shifted...The Awakening Has Begun
View GitHub Profile
@kenorb
kenorb / .gitattributes
Created March 9, 2023 14:09 — forked from nemotoo/.gitattributes
.gitattributes for Unity3D with git-lfs
## Unity ##
*.cs diff=csharp text
*.cginc text
*.shader text
*.mat merge=unityyamlmerge eol=lf
*.anim merge=unityyamlmerge eol=lf
*.unity merge=unityyamlmerge eol=lf
*.prefab merge=unityyamlmerge eol=lf
@kenorb
kenorb / DownloadMixamoByJakeCattrall.js
Last active February 7, 2023 16:02 — forked from krazyjakee/DownloadMixamoByJakeCattrall.js
Downloads all the free Mixamo Animations
function trigger(el, eventType) {
if (typeof eventType === 'string' && typeof el[eventType] === 'function') {
el[eventType]();
} else {
const event =
eventType === 'string'
? new Event(eventType, {bubbles: true})
: eventType;
el.dispatchEvent(event);
}
alizarin
amaranth
amber
amethyst
apricot
aqua
aquamarine
asparagus
auburn
azure
alizarin
amaranth
amber
amethyst
apricot
aqua
aquamarine
asparagus
auburn
azure
@kenorb
kenorb / torch-relu-simple-sorting-example.ipynb
Created July 20, 2022 11:54
Torch-relu-simple-sorting-example.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kenorb
kenorb / syslog-gdm-errors.log
Created December 18, 2021 13:41
Setting a mode on head 0 failed: Insufficient permissions
==> auth.log <==
Dec 18 13:37:48 Ubuntu-ROG polkitd(authority=local): Unregistered Authentication Agent for unix-session:c14 (system bus name :1.628, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_GB.UTF-8) (disconnected from bus)
==> gpu-manager-switch.log <==
==> kern.log <==
Dec 18 13:37:48 Ubuntu-ROG kernel: [ 7673.827587] [drm:nv_drm_master_set [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x0000b400] Failed to grab modeset ownership
Dec 18 13:37:48 Ubuntu-ROG kernel: [ 7673.827750] [drm:nv_drm_master_set [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00006500] Failed to grab modeset ownership
Dec 18 13:37:48 Ubuntu-ROG kernel: [ 7673.827848] [drm:nv_drm_master_set [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00001800] Failed to grab modeset ownership
Dec 18 13:37:48 Ubuntu-ROG kernel: [ 7673.827940] [drm:nv_drm_master_set [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00001700] Failed to grab modeset ownership
# Show Tensor Images utility function
from torchvision.utils import make_grid
import matplotlib.pyplot as plt
def show_tensor_images(image_tensor, num_images=25, size=(1, 28, 28)):
'''
Function for visualizing images: Given a tensor of images, number of images, and
size per image, plots and prints the images in a uniform grid.
'''
def conv_backward(dH, cache):
'''
The backward computation for a convolution function
Arguments:
dH -- gradient of the cost with respect to output of the conv layer (H), numpy array of shape (n_H, n_W) assuming channels = 1
cache -- cache of values needed for the conv_backward(), output of conv_forward()
Returns:
dX -- gradient of the cost with respect to input of the conv layer (X), numpy array of shape (n_H_prev, n_W_prev) assuming channels = 1
def conv_forward(X, W):
'''
The forward computation for a convolution function
Arguments:
X -- output activations of the previous layer, numpy array of shape (n_H_prev, n_W_prev) assuming input channels = 1
W -- Weights, numpy array of size (f, f) assuming number of filters = 1
Returns:
H -- conv output, numpy array of size (n_H, n_W)
def conv_forward(X, W):
'''
The forward computation for a convolution function
Arguments:
X -- output activations of the previous layer, numpy array of shape (n_H_prev, n_W_prev) assuming input channels = 1
W -- Weights, numpy array of size (f, f) assuming number of filters = 1
Returns:
H -- conv output, numpy array of size (n_H, n_W)