Skip to content

Instantly share code, notes, and snippets.

Avatar
🏔️

ixaxaar ixaxaar

🏔️
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am ixaxaar on github.
  • I am ixaxaar (https://keybase.io/ixaxaar) on keybase.
  • I have a public key ASB1_GhKK6fgdyPZ7b47W-Ml_eVJZzPVa9M6YlAXm5ph5Ao

To claim this, I am signing this object:

View AgdaBasics.agda
module AgdaBasics where
apply : (A : Set)(B : A Set) ((x : A) B x) (a : A) B a
apply A B f a = f a
_∘_ : {A : Set}{B : A Set}{C : (x : A) B x Set}
(f : {x : A}(y : B x) C x y)(g : (x : A) B x)
(x : A) C x (g x)
(f ∘ g) x = f (g x)
View run_on_save.sh
#!/bin/sh
###############################################################################################
# Run as ./run_on_save.sh ./file/to/watch ./script/to/run.sh --args --to --give --to --script
###############################################################################################
# get the current path
CURPATH=`pwd`
TO_WATCH=$1
@ixaxaar
ixaxaar / install-chrome.sh
Last active Sep 19, 2018 — forked from ziadoz/install.sh
Install Chrome, ChromeDriver and Selenium on Ubuntu 16.04
View install-chrome.sh
#!/bin/bash
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
sudo apt-get update
sudo apt-get install -y google-chrome-stable
@ixaxaar
ixaxaar / unmerge_backoff.py
Created Jul 11, 2018
Backoff by blocks when batch inserting data somewhere, and a few records tend to fail
View unmerge_backoff.py
from collections import Iterable
def flatten(l):
if not isinstance(l, Iterable):
yield l
else:
for el in l:
if isinstance(el, Iterable) and not isinstance(el, (str, bytes)):
yield from flatten(el)
@ixaxaar
ixaxaar / hadoop_root.sh
Last active Jun 21, 2018
Find and extract hadoop root url for use in bash scripts
View hadoop_root.sh
#!/usr/bin/env bash
HH=`awk '/fs\.defaultFS/{getline; print}' /etc/hadoop/conf/core-site.xml `
HH1=`echo "${HH/<value>/}"`
HADOOP_ROOT=`echo "${HH1/<\/value>/}"`
echo $HADOOP_ROOT
View uninstall_azure_cli.sh
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
@ixaxaar
ixaxaar / mnist_one_shot_aae_classification.ipynb
Created Apr 30, 2018
One-shot exemplar classification using Adversarial Autoencoders
View mnist_one_shot_aae_classification.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View 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
View gcloud_cluster.sh
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