Skip to content

Instantly share code, notes, and snippets.

View snithish's full-sized avatar
🌍
Focusing

Nithish Sankaranarayanan snithish

🌍
Focusing
  • Booking.com B.V
  • Amsterdam
View GitHub Profile
@snithish
snithish / all_paths.scala
Last active September 9, 2023 19:01
Graphx All Paths With Loop Rectification
package com.snithish
import org.apache.spark.graphx._
import org.apache.spark.graphx.lib.PageRank
import org.apache.spark.graphx.util.GraphGenerators
import org.apache.spark.sql.{DataFrame, SparkSession}
// To make some of the examples work we will also need RDD
import org.apache.spark.rdd.RDD
@snithish
snithish / cheat-sheet.md
Last active April 18, 2018 10:38
Commands for debugging postgresql

Find space occcupied by tables in postgresql

SELECT table_name,
       Pg_size_pretty(table_size)   AS table_size,
       Pg_size_pretty(indexes_size) AS indexes_size,
       Pg_size_pretty(total_size)   AS total_size
FROM   (SELECT table_name,
               Pg_table_size(table_name)          AS table_size,
               Pg_indexes_size(table_name)        AS indexes_size,
 Pg_total_relation_size(table_name) AS total_size
@snithish
snithish / gist:32505c5a7a592ccc52ade1c59406638a
Last active August 13, 2018 15:29
keybase verification
### Keybase proof
I hereby claim:
* I am snithish on github.
* I am snithish (https://keybase.io/snithish) on keybase.
* I have a public key whose fingerprint is B2E2 03D3 4A06 E129 8D98 021F 60E5 4EA5 0D2D 23CB
To claim this, I am signing this object: