Skip to content

Instantly share code, notes, and snippets.

View Kelvinson's full-sized avatar
💭
This cat is googling and stackoverflowing~

Dong W Kelvinson

💭
This cat is googling and stackoverflowing~
  • Somewhere
View GitHub Profile
@Kelvinson
Kelvinson / Install NVIDIA Driver and CUDA.md
Created April 17, 2018 22:25 — forked from wangruohui/Install NVIDIA Driver and CUDA.md
Install NVIDIA Driver and CUDA on Ubuntu / CentOS / Fedora Linux OS
@MaximumEntropy
MaximumEntropy / padded_rnn.py
Last active July 23, 2018 12:46
Padded RNN PyTorch
import torch
import torch.nn as nn
from torch.autograd import Variable
from torch.nn.utils.rnn import pad_packed_sequence, pack_padded_sequence
x = Variable(torch.randn(10, 20, 30)).cuda()
lens = range(10)
x = pack_padded_sequence(x, lens[::-1], batch_first=True)
@fredcallaway
fredcallaway / ed_hmm.py
Last active November 8, 2018 03:06
Hidden Markov Model implemented in edward
#!/usr/bin/env python
"""Hidden Markov Models
Abstract base class for HMMs and an implementation of an HMM
with discrete states and gaussian emissions.
"""
import tensorflow as tf
import edward as ed
from edward.models import Bernoulli, Categorical, Normal
@UsmanMaqbool
UsmanMaqbool / robotics.md
Created June 19, 2018 14:12
Robotics Installation

Installation Guide

OPENCV

OpenCV 2.4.13

To install

cd ~
@radekosmulski
radekosmulski / train_on_CIFAR10.py
Created June 20, 2019 19:29
training on CIFAR10 using fastai from the command line
import fire
import fastai
from fastai.vision import *
from torch import nn
from fastai.metrics import top_k_accuracy
path = untar_data(URLs.CIFAR)
data = ImageDataBunch.from_folder(path, valid='test')
class block(nn.Module):
@AustinRochford
AustinRochford / hmc-oss-pymc3-odsc-west-2018.ipynb
Last active October 16, 2019 08:40
The HMC Revolution is Open Source - Probabilistic Programming with PyMC3
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@douglas-vaz
douglas-vaz / graph_search.cpp
Created March 2, 2013 19:57
Breadth First Search and Depth First Search in C++
#include <iostream>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <algorithm>
using namespace std;
class Node{
@fonnesbeck
fonnesbeck / hmm.py
Created March 25, 2010 00:01
Hidden Markov model in PyMC
import numpy as np
import pymc
import pdb
def unconditionalProbability(Ptrans):
"""Compute the unconditional probability for the states of a
Markov chain."""
m = Ptrans.shape[0]
@whizzzkid
whizzzkid / XPS-15 9560 Getting Nvidia To Work on KDE Neon
Last active December 3, 2022 15:43
[XPS 15 Early 2017 9560 kabylake] Making Nvidia Drivers + (CUDA 8 / CUDA 9 / CUDA 9.1) + Bumblebee work together on linux ( Ubuntu / KDE Neon / Linux Mint / debian )
# Instructions for 4.14 and cuda 9.1
# If upgrading from 4.13 and cuda 9.0
$ sudo apt-get purge --auto-remove libcud*
$ sudo apt-get purge --auto-remove cuda*
$ sudo apt-get purge --auto-remove nvidia*
# also remove the container directory direcotory at /usr/local/cuda-9.0/
# Important libs required with 4.14.x with Cuda 9.X
$ sudo apt install libelf1 libelf-dev