Skip to content

Instantly share code, notes, and snippets.

@rrrlw
rrrlw / TDA-in-R.md
Last active November 12, 2022 22:28
A short tutorial on conducting topological data analysis in R.

Topological data analysis (TDA) in R

Purpose

Topological data analysis (or TDA) is a growing discipline with great potential. Unfortunately, the difficulty of learning the software used to perform TDA on real datasets is a nontrivial task adds an oft intimidating barrier to entry. This Gist provides a straightforward tutorial to using the TDAstats package to conduct topological data analysis (specifically, persistent homology using Vietoris-Rips simplicial complexes) in R.

N.B. this Gist largely assumes the reader is familiar with a Vietoris-Rips simplicial complex, persistent homology, topological barcodes, and persistence diagrams. Please make sure you have at least a basic understanding of these terms prior to proceeding.

Date/Time Open PRs Open Issues
2014-11-04T20:11:31.611119 8 126
2014-11-10T10:46:55.208083 6 123
@relrod
relrod / gist:dd748c9ee0b111c3bd47
Last active July 10, 2020 12:19
Pure IO in OCaml via the Free monad
(* Purely functional I/O in Ocaml via the Free monad.
* by Ricky Elrod <relrod@haskell.org>.
*
* This is free and unencumbered software released into the public domain.
*
* Anyone is free to copy, modify, publish, use, compile, sell, or
* distribute this software, either in source code form or as a compiled
* binary, for any purpose, commercial or non-commercial, and by any
* means.
*
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active April 22, 2024 01:47
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

Three comparison points:
Presto + RCFile vs Impala + RCFile vs Impala + Parquet
Note: Query time, CPU utilization, Disk read tput (KBRead)
Impala v1.1.1
Presto v0.52
================================================================================================================================
Presto + RCFile:
select ss_sold_date_sk, count(*) from store_sales_rcfile group by 1 order by 1 limit 2000;
@massie
massie / KryoRegistrator.scala
Created October 29, 2013 23:59
Here's an example of how to embed Avro objects into a Kryo stream. You only need to register each Avro Specific class in the KryoRegistrator using the AvroSerializer class below and you're ready to go.
/*
* Copyright (c) 2013. Regents of the University of California
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@vsajip
vsajip / pyvenvex.py
Last active April 18, 2024 13:44
A script which demonstrates how to extend Python 3.3's EnvBuilder, by installing setuptools and pip in created venvs. This functionality is not provided as an integral part of Python 3.3 because, while setuptools and pip are very popular, they are third-party packages.The script needs Python 3.3 or later; invoke it using"python pyvenvex.py -h"fo…
#
# Copyright (C) 2013-2020 Vinay Sajip. New BSD License.
#
import os
import os.path
from subprocess import Popen, PIPE
import sys
from threading import Thread
from urllib.parse import urlparse
from urllib.request import urlretrieve