Skip to content

Instantly share code, notes, and snippets.

View biggzlar's full-sized avatar
🐣
I may be slow to respond.

Lennart biggzlar

🐣
I may be slow to respond.
View GitHub Profile
@sidravi1
sidravi1 / hmc_anim.py
Created June 15, 2019 05:19
HMC animation
import autograd.numpy as np
import scipy.stats as st
import matplotlib.pyplot as plt
import matplotlib.animation as animation
import matplotlib as mpl
import seaborn as sns
from minimc.minimc.minimc_slow import hamiltonian_monte_carlo as hmc_slow
from minimc.minimc import neg_log_normal, mixture
@nadavrot
nadavrot / Matrix.md
Last active April 26, 2024 08:28
Efficient matrix multiplication

High-Performance Matrix Multiplication

This is a short post that explains how to write a high-performance matrix multiplication program on modern processors. In this tutorial I will use a single core of the Skylake-client CPU with AVX2, but the principles in this post also apply to other processors with different instruction sets (such as AVX512).

Intro

Matrix multiplication is a mathematical operation that defines the product of

// Unity C# Cheat Sheet
// I made these examples for students with prior exerience working with C# and Unity.
// Too much? Try Unity's very good tutorials to get up to speed: https://unity3d.com/learn/tutorials/topics/scripting
@karpathy
karpathy / pg-pong.py
Created May 30, 2016 22:50
Training a Neural Network ATARI Pong agent with Policy Gradients from raw pixels
""" Trains an agent with (stochastic) Policy Gradients on Pong. Uses OpenAI Gym. """
import numpy as np
import cPickle as pickle
import gym
# hyperparameters
H = 200 # number of hidden layer neurons
batch_size = 10 # every how many episodes to do a param update?
learning_rate = 1e-4
gamma = 0.99 # discount factor for reward
@yrevar
yrevar / imagenet1000_clsidx_to_labels.txt
Last active April 30, 2024 12:39
text: imagenet 1000 class idx to human readable labels (Fox, E., & Guestrin, C. (n.d.). Coursera Machine Learning Specialization.)
{0: 'tench, Tinca tinca',
1: 'goldfish, Carassius auratus',
2: 'great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias',
3: 'tiger shark, Galeocerdo cuvieri',
4: 'hammerhead, hammerhead shark',
5: 'electric ray, crampfish, numbfish, torpedo',
6: 'stingray',
7: 'cock',
8: 'hen',
9: 'ostrich, Struthio camelus',
@jhbush
jhbush / install_microsoft_office_15.12.3.sh
Last active April 24, 2017 08:25 — forked from opragel/laziest_install_microsoft_office2016.sh
install_microsoft_office_15.12.3.sh
#!/bin/bash
DOWNLOAD_URLS=( \
#Outlook
"http://download.microsoft.com/download/A/2/C/A2C967A4-8B34-48FE-BC3D-E6532CC2DCD0/Microsoft_Outlook_15.12.3_Updater.pkg" \
# Word
"http://download.microsoft.com/download/8/F/0/8F0A32FB-A355-41D1-BBFB-55C734814787/Microsoft_Word_15.12.3_Updater.pkg" \
# Excel
"http://download.microsoft.com/download/8/F/4/8F4AB813-DEFA-4603-9397-D2C73F1EE5BF/Microsoft_Excel_15.12.3_Updater.pkg" \
# Powerpoint
"http://download.microsoft.com/download/3/3/9/33959026-296A-449D-97E3-3FA7944AC373/Microsoft_PowerPoint_15.12.3_Updater.pkg" \
@victorreyesh
victorreyesh / Aircrack Commands
Created September 12, 2013 03:36
Cracking WPA2 / WEP Wifi / Aircrack 10 seconds guide. For Mac OSX
//Install Macports.
//Install aircrack-ng:
sudo port install aircrack-ng
//Install the latest Xcode, with the Command Line Tools.
//Create the following symlink:
sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/sbin/airport
//Figure out which channel you need to sniff:
sudo airport -s
sudo airport en1 sniff [CHANNEL]
@moklett
moklett / openconnect.md
Created July 24, 2012 15:21
OpenConnect VPN on Mac OS X

Unfortunately, the Cisco AnyConnect client for Mac conflicts with Pow. And by "conflicts", I mean it causes a grey-screen-of-death kernel panic anytime you connect to the VPN and Pow is installed.

As an alternative, there is OpenConnect, a command-line client for Cisco's AnyConnect SSL VPN.

Here's how to get it set up on Mac OS X:

  1. OpenConnect can be installed via homebrew:

     brew update
    

brew install openconnect