Skip to content

Instantly share code, notes, and snippets.

  • Install java on your machine. Personally, I use jabba, a java version manager. Feel free to use your system package manager if desired (e.g. apt, brew, or yum to install the appropriate version)
  • Fork and check out your own copy of the Presto GitHub repository
     git clone [email protected]:<your-username>/presto.git
    
  • Compile the main portion of the codebase
    • We use Apache Maven to build the code. It is invoked through the ./mvnw script in the root of the repository.
@ZacBlanco
ZacBlanco / HashCodeTester.java
Last active January 23, 2019 19:06
Java hashCode Tester
package alluxio;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ZacBlanco
ZacBlanco / spark-ui-ssh-proxy.md
Last active July 5, 2018 18:51
Connect to Spark UI using an SSH Proxy for HPC Clusters

So you want to use the spark UI?

HPC clusters typically don't have great support for long-running clusters, thus information from the cluster and UI are short-lived. It also makes it more difficult to monitor Spark jobs without the UI.

All you have to do is use SSH to configure a proxy and tell firefox (or your preferred browser) to use that tunnel as a proxy.

Steps

1 - Get an SSH tunnel

@ZacBlanco
ZacBlanco / fbpca_test.py
Created December 11, 2017 19:10
Facebook fast SVD/PCA test
import unittest
import numpy as np
import fbpca
from scipy.linalg import qr, lu
class FBPCATest(unittest.TestCase):
def test1(self):
a = np.matrix([
[1, 5, 10, 1, 18],
@ZacBlanco
ZacBlanco / Graph.java
Created November 29, 2017 02:34
Graph Problems - Study Group - 11/28/17
class Graph {
Neighbor[] adjList; // Vertices represented as integers
public boolean hasPath(int u, int v) { // assume u, v are in range
}
public ArrayList < Integer > getPath(int u, int v) { // assume u, v are in range
}
}
class Neighbor {
int vertex;
Neighbor next;
@ZacBlanco
ZacBlanco / BTree.java
Created October 24, 2017 17:01
Binary Tree Solution with Generics
import java.util.ArrayList;
public class BTree<T extends Comparable<T>> {
public static void main (String[] args) {
printScoreReport(test());
// You can write more code to test your methods under here.
}
@ZacBlanco
ZacBlanco / List.java
Created October 3, 2017 20:29
CS112 Study Group 10/3/17
package io.blanco;
import java.util.NoSuchElementException;
public class List<T extends Comparable<T>> {
private Node<T> head;
private int size;
public int size() {
import java.util.*;
public class myclass {
static boolean recursion_proper = false;
static int original_input = 123123123;
static int recursion_count = 0;
public static void main(String[] args) {
System.out.println("Hello, World!");
DecToBin(Integer.parseInt(args[0]));
@ZacBlanco
ZacBlanco / LSETester.java
Last active March 31, 2017 18:21
Driver for Little Search Engine
package search;
import java.io.*;
import java.util.*;
public class LSETester {
public static void main(String[] args) throws FileNotFoundException {
LittleSearchEngine lse = new LittleSearchEngine();
@ZacBlanco
ZacBlanco / ConsensusAnalysis.ipynb
Last active March 21, 2017 07:17
Aresty Data Analysis Using Jypter Python Notebook
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.