Skip to content

Instantly share code, notes, and snippets.

View ixaxaar's full-sized avatar
🏔️

ixaxaar ixaxaar

🏔️
View GitHub Profile
@ixaxaar
ixaxaar / beamPermute.scala
Last active March 2, 2017 09:17
Beam over permutations, find the best possible sequence given a perplexity function
def beamPermute[T](
data: List[T],
perplexityFn: List[T] => Double,
startNode: T,
beamSize: Int = 10,
beamWindow: Int = 3
): List[(List[T], Double)] = {
var candidates = List((List(startNode), 0d))
#!/usr/bin/env bash
sudo apt-get install -y python3-pip python3-dev python-dev python-pip
sudo pip install langid
sudo pip2 install langid
sudo pip3 install langid
  1. download model
if [[ ! -e 'numberbatch-17.06.txt' ]]; then
    wget https://conceptnet.s3.amazonaws.com/downloads/2017/numberbatch/numberbatch-17.06.txt.gz
    gunzip numberbatch-17.06.txt.gz
fi
sudo pip install wordfreq
sudo pip install gensim
def repackage_hidden(h):
"""Wraps hidden states in new Variables, to detach them from their history."""
if type(h) == Variable:
return Variable(h.data)
elif type(h) == tuple:
return tuple(repackage_hidden(v) for v in h)
elif type(h) == list:
return [ repackage_hidden(v) for v in h ]
def repackage_hidden_dnc(h):
import faiss
from faiss import cast_integer_to_float_ptr as cast_float
from faiss import cast_integer_to_int_ptr as cast_int
from faiss import cast_integer_to_long_ptr as cast_long
import torch as T
def ptr(tensor):
gdb python
GNU gdb (GDB) 8.0.1
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
declare -a regions=('us-central1-a' 'us-west1-a' 'us-east1-b' 'northamerica-northeast1-a' 'us-east4-a' 'southamerica-east1-a' 'europe-west1-b' 'europe-west2-a' 'europe-west3-a' 'europe-west4-b' 'asia-south1-a' 'asia-southeast1-a')
for region in ${regions[@]}; do
gcloud compute instances create \
--machine-type=n1-highcpu-16 \
--preemptible \
--zone $region \
spotty-${region} \
--metadata-from-file startup-script=/home/ixaxaar/unitus_startup.sh
#!/usr/bin/env bash
sudo su -
cd
apt update
apt install -y build-essential libssl-dev libcurl4-openssl-dev automake autoconf git pkg-config libtool libjansson-dev
git clone https://github.com/unitusdev/unitus-cpuminer.git
cd unitus-cpuminer
@ixaxaar
ixaxaar / mnist_one_shot_aae_classification.ipynb
Created April 30, 2018 07:30
One-shot exemplar classification using Adversarial Autoencoders
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
sudo pip uninstall -y azure
sudo pip uninstall -y azure-batch
sudo pip uninstall -y azure-common
sudo pip uninstall -y azure-cosmosdb-nspkg
sudo pip uninstall -y azure-cosmosdb-table
sudo pip uninstall -y azure-datalake-store
sudo pip uninstall -y azure-eventgrid
sudo pip uninstall -y azure-graphrbac
sudo pip uninstall -y azure-keyvault
sudo pip uninstall -y azure-mgmt