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
@alecholmez
alecholmez / delta_xds.md
Last active October 12, 2021 17:21
Incremental xDS Implementation Plan
@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 = []() {

Recap

Details / How

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

@mkolod
mkolod / rpn_jit.ipynb
Last active May 2, 2019 00:03
CUDA pointwise fuser
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fnky
fnky / ANSI.md
Last active October 25, 2025 05:55
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
import mxnet as mx
from mxnet.gluon.model_zoo import vision
import os
import time
batch_shape = (1, 3, 224, 224)
resnet18 = vision.resnet18_v2(pretrained=True)
resnet18.hybridize()
resnet18.forward(mx.nd.zeros(batch_shape))
resnet18.export('resnet18_v2')
def static_var(name, value):
def helper(fun):
setattr(fun, name, value)
return fun
return helper
@static_var("my_var", 0)
@static_var("my_other_var", "HAL")
def foo():
@sinclairtarget
sinclairtarget / bernoulli.c
Created August 17, 2018 20:22
Lovelace's Note G Program in C
#include <stdio.h>
/*
* Calculates what Ada Lovelace labeled "B7", which today we would call the 8th
* Bernoulli number.
*/
int main(int argc, char* argv[])
{
// ------------------------------------------------------------------------
// Data
@mcaleavya
mcaleavya / qos.py
Created July 4, 2018 23:58
cgroup QOS using eBPF
#!/usr/bin/python
# @lint-avoid-python-3-compatibility-imports
#
# qos implement a dynamic qos for using cgroups
# For Linux, uses BCC, eBPF.
#
# USAGE: qos.py [-h] [-qc] [--max] [interval]
# requires a file name qos_setup which can changed with qosfile
# file has format maj:min IOPS
# i.e. 8:0 40000