Skip to content

Instantly share code, notes, and snippets.

View VincentTam's full-sized avatar
🏀
Rolling around

Vincent Tam VincentTam

🏀
Rolling around
View GitHub Profile
@ElefHead
ElefHead / Installing_theano_and_pymc3.md
Last active July 12, 2022 14:55
A guide to install pymc3, theano with CUDA on windows 10 -- Dec 2019

I am writing this gist because I spent 6 hours navigating links trying to get Theano to work with CUDA on windows 10. Hopefully, you wouldn't have to. Once theano is setup and running, you can install pymc3 and it all works. I had tensorflow-gpu setup and running on windows 10; it isn't as simple as pip install theano.

I will list down the instructions, with the links where I found them. Hope this helps someone.

This set of instructions depend on anaconda. Also, this is sort of hacky in the end.

Ok let's begin.


@VincentTam
VincentTam / mydual.m
Last active February 21, 2017 09:32
My Octave dual simplex tableau generator
# Show dual simplex tableau
# Prereq: matrix A, vectors b,c, basis
printf("Current basis:"); printf(" %2i", basis); disp("");
B = A(:,basis); cB = c(basis);
Bm1A = B\A; xB = B\b; zrow = cB'*Bm1A-c'; zval = cB'*xB;
if length(xB(xB<0)) >= 1
ovp = find(xB==min(xB(xB<0)))(1);
r = zrow./Bm1A(ovp,:); # ratio for display
T = [0:size(A)(2) 0; basis' Bm1A xB; 0 zrow zval; 0 r 0]
# compute min ratio
@VincentTam
VincentTam / mytest.m
Last active February 20, 2017 13:34
My Octave simplex tableau generator
# Show simplex tableau
# Prereq: matrix A, vectors b,c, basis
printf("Current basis:"); printf(" %2i", basis); disp("");
B = A(:,basis); cB = c(basis);
Bm1A = B\A; x_B = B\b; zrow = cB'*Bm1A-c'; zval = cB'*x_B;
nv = find(zrow==min(zrow(zrow<=0)))(1);
r = x_B./Bm1A(:,nv);
T = [0:size(A)(2) 0 0; basis' Bm1A x_B r; 0 zrow zval 0]
if length(r(r>=0)) >= 1
ovp = find(r==min(r(r>=0)))(1);
@VincentTam
VincentTam / sample-output.txt
Last active January 25, 2017 22:04
Octave script for French postal fee with min no. of stamps, run on http://octave-online.net/
Valeur de timbre (€) | Quantité
---------------------+---------
0.71 | 0
0.73 | 0
1.46 | 1
2.92 | 6
0.85 | 0
1.70 | 0
3.40 | 7
1.30 | 0
@magicznyleszek
magicznyleszek / jekyll-and-liquid.md
Last active January 12, 2024 03:46
Jekyll & Liquid Cheatsheet

Jekyll & Liquid Cheatsheet

A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.

Running

Running a local server for testing purposes:

@rxaviers
rxaviers / gist:7360908
Last active May 10, 2024 23:34
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@joyrexus
joyrexus / README.md
Last active May 3, 2024 10:41 — forked from liamcurry/gist:2597326
Vanilla JS equivalents of jQuery methods

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@gizmaa
gizmaa / Plot_Examples.md
Last active May 8, 2024 13:38
Various Julia plotting examples using PyPlot