Skip to content

Instantly share code, notes, and snippets.

@picchietti
picchietti / _wireless.md
Last active May 14, 2025 15:21
Making a wireless router with an ASUS PCE-AC88 and Linux (Ubuntu 18.04 LTS)

Introduction

This project makes a wifi router out of an ASUS PCE-AC88 wireless adapter and your Ubuntu Linux computer that can exceed top of the line routers.

Instead of buying a gaming grade router or another computer that you install openWRT on, follow this project and put the savings towards upgrading your main computer or modem.

Add Adapter

The adapter needs to be added to a PCI slot and the wireless antenna needs to be connected to the adapter. If your computer does not detect it, you may need to re-seat the adapter in the slot. If you can't detect wireless networks after installing the firmware below then this is probably why.

Install Firmware for Adapter

For your computer to use the wifi adapter you need to add the missing firmware that Asus won't provide.

@W4ngatang
W4ngatang / download_glue_data.py
Last active May 4, 2025 12:17
Script for downloading data of the GLUE benchmark (gluebenchmark.com)
''' Script for downloading all GLUE data.
Note: for legal reasons, we are unable to host MRPC.
You can either use the version hosted by the SentEval team, which is already tokenized,
or you can download the original data from (https://download.microsoft.com/download/D/4/6/D46FF87A-F6B9-4252-AA8B-3604ED519838/MSRParaphraseCorpus.msi) and extract the data from it manually.
For Windows users, you can run the .msi file. For Mac and Linux users, consider an external library such as 'cabextract' (see below for an example).
You should then rename and place specific files in a folder (see below for an example).
mkdir MRPC
cabextract MSRParaphraseCorpus.msi -d MRPC
@robcarver17
robcarver17 / temp.py
Last active September 12, 2024 08:27
Get IB historical data native python API updated for bar class
# Gist example of IB wrapper ...
#
# Download API from http://interactivebrokers.github.io/#
#
# Install python API code /IBJts/source/pythonclient $ python3 setup.py install
#
# Note: The test cases, and the documentation refer to a python package called IBApi,
# but the actual package is called ibapi. Go figure.
#
# Get the latest version of the gateway:
@kevinzakka
kevinzakka / data_loader.py
Last active March 16, 2025 18:14
Train, Validation and Test Split for torchvision Datasets
"""
Create train, valid, test iterators for CIFAR-10 [1].
Easily extended to MNIST, CIFAR-100 and Imagenet.
[1]: https://discuss.pytorch.org/t/feedback-on-pytorch-for-kaggle-competitions/2252/4
"""
import torch
import numpy as np
@dpiponi
dpiponi / self.py
Last active June 14, 2017 17:28
Here are some tanh units being self-normalising
# See "Self-Normalizing Neural Networks" https://arxiv.org/abs/1706.02515
# "SNNs cannot be derived with...tanh units..."
# So I'm probably missing the point somewhere...
import math
import numpy
# Magic number
lambda0 = 1.59254
# Gist example of IB wrapper ...
#
# Download API from http://interactivebrokers.github.io/#
#
# Install python API code /IBJts/source/pythonclient $ python3 setup.py install
#
# Note: The test cases, and the documentation refer to a python package called IBApi,
# but the actual package is called ibapi. Go figure.
#
# Get the latest version of the gateway:
@TimZaman
TimZaman / tf_rotating_gpu_buffer.py
Created December 11, 2016 17:47
Tensorflow Rotating GPU Buffer
# Implementation of a rotating buffer on the GPU of size 2.
import threading
import tensorflow as tf
from tensorflow.python.client import timeline
import numpy as np
import time
params = {
'batch_size': 128,
'seg_len': 4000,
@JonathanRaiman
JonathanRaiman / gemm_parallel.cpp
Created July 20, 2016 17:32
Explicit and implicit BLAS gemm parallelism.
/*
Comparing explicit BLAS parallelism using a thread pool
with vendor-implemented parallelism.
Program prints the runtime averaged over 100 runs of a matrix
multiply between two float matrices.
To run:
./gemm_parallel [<int> USE_EXPLICIT_PARALELLISM 0/1] [<int> LEADING_DIMENSION]
@shagunsodhani
shagunsodhani / DistributedGraphLab.md
Created April 11, 2016 02:01
Notes for "Distributed GraphLab: A Framework for Machine Learning and Data Mining in the Cloud" paper.

Introduction

  • GraphLab abstraction exposes asynchronous, dynamic, graph-parallel computation model in the shared-memory setting.
  • This paper extends the abstraction to the distributed setting.
  • Link to the paper.

Characteristics of MLDM (Machine Learning and Data Mining)

  • Graph Structured Computation
  • Sometimes computation requires modeling dependencies between data.
@thoolihan
thoolihan / install_tensorflow_centos7.sh
Last active January 28, 2019 06:17
Install TensorFlow on CentOS7
sudo yum -y install epel-release
sudo yum -y install gcc gcc-c++ python-pip python-devel atlas atlas-devel gcc-gfortran openssl-devel libffi-devel
# use pip or pip3 as you prefer for python or python3
pip install --upgrade virtualenv
virtualenv --system-site-packages ~/venvs/tensorflow
source ~/venvs/tensorflow/bin/activate
pip install --upgrade numpy scipy wheel cryptography #optional
pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.10.0rc0-cp35-cp35m-linux_x86_64.whl
# or below if you want gpu, support, but cuda and cudnn are required, see docs for more install instructions
pip install --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.10.0rc0-cp35-cp35m-linux_x86_64.whl