Skip to content

Instantly share code, notes, and snippets.

View mihaitodor's full-sized avatar
:shipit:
Shipit!

Mihai Todor mihaitodor

:shipit:
Shipit!
View GitHub Profile
@mkolod
mkolod / rpn_jit.ipynb
Last active May 2, 2019 00:03
CUDA pointwise fuser
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Recap

Details / How

@bnyeggen
bnyeggen / upgradablelock.go
Last active July 25, 2019 03:31
Upgradable read -> write locks in Go
package main
import (
"fmt"
"runtime"
"sync"
)
type UpgradableLock struct {
uglMutex sync.RWMutex

TL;DR: what was the bug? (spoilers!): https://gist.github.com/trptcolin/6039cd454acfe6e820d13cbdce5e4064

@mkolod
mkolod / dlopen_driver.cpp
Created December 17, 2019 17:31
Preloading shared lib (CUDA driver) before main runs
#include <iostream>
#include <iomanip>
#include <dlfcn.h>
using std::cout;
using std::cerr;
using std::endl;
void* h = []() {

How to install Node.js applications, if you're not a Node.js developer

While installing a Node.js application isn't difficult in principle, it may still be confusing if you're not used to how the Node.js ecosystem works. This post will tell you how to get the application going, what to expect, and what to do if it doesn't work.

Occasionally an application may have custom installation steps, such as installing special system-wide dependencies; in those cases, you'll want to have a look at the install documentation of the application itself as well. However, most of the time it's safe to assume that the instructions below will work fine.

If the application you want to install is available in your distribution's repositories, then install it through there instead and skip this entire guide; your distribution's package manager will take care of all the dependencies.

Checklist

.global main
.func main
main:
LDR R0, =random_seed
LDR R0, [R0]
MOV R1, #num_elements
BL _rng_loop
LDR R0, =unordered_msg
BL printf
@donmccurdy
donmccurdy / dat-api.md
Created November 29, 2017 16:46
Missing api docs for dat.gui.
@kendricktan
kendricktan / capsule_networks.py
Last active August 17, 2021 17:12
Clean Code for Capsule Networks
"""
Dynamic Routing Between Capsules
https://arxiv.org/abs/1710.09829
"""
import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
import torchvision.transforms as transforms
@kloudsamurai
kloudsamurai / java_homebrew.sh
Last active September 10, 2021 13:53
Install Java via Homebrew (brew) on Mac OSX with unlimited strength JCE
brew update
brew cask install java
brew cask install jce-unlimited-strength-policy
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`