https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Inspired by https://gist.github.com/abesto/cdcdd38263eacf1cbb51 | |
// Task creates a .dot file with all inter-module dependencies | |
// Supports any depth of nested modules | |
task moduleDependencyReport { | |
doLast { | |
def file = new File("project-dependencies.dot") | |
file.delete() | |
file << "digraph {\n" | |
file << "splines=ortho\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This file contains the core idea of wrapping an underlying OutputFormat with an OutputFormat | |
* with an augmented key that writes to partitions using MultipleOutputs (or something similar) | |
*/ | |
package model.hadoop | |
import model.hadoop.HadoopIO.MultipleOutputer | |
import model.hadoop.HadoopIO.MultipleOutputer._ | |
import org.apache.hadoop.io.{DataInputBuffer, NullWritable} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Example using MultipleOutputs to write a Spark RDD to multiples files. | |
Based on saveAsNewAPIHadoopFile implemented in org.apache.spark.rdd.PairRDDFunctions, org.apache.hadoop.mapreduce.SparkHadoopMapReduceUtil. | |
val values = sc.parallelize(List( | |
("fruit/items", "apple"), | |
("vegetable/items", "broccoli"), | |
("fruit/items", "pear"), | |
("fruit/items", "peach"), | |
("vegetable/items", "celery"), | |
("vegetable/items", "spinach") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.maven.shared.dependency.analyzer.ClassAnalyzer | |
import org.apache.maven.shared.dependency.analyzer.DefaultClassAnalyzer | |
import org.apache.maven.shared.dependency.analyzer.DependencyAnalyzer | |
import org.apache.maven.shared.dependency.analyzer.ProjectDependencyAnalysis | |
import org.apache.maven.shared.dependency.analyzer.asm.ASMDependencyAnalyzer | |
import org.gradle.api.Project | |
import org.gradle.api.artifacts.ConfigurationContainer | |
import org.gradle.api.artifacts.ResolvedArtifact | |
import org.gradle.api.artifacts.ResolvedDependency |
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns
Compress 1K bytes with Zippy ............. 3,000 ns = 3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs
*update: TBC, but this new might affect how easy it is to use this technique past August 2024: Authy is shutting down its desktop app | The 2FA app Authy will only be available on Android and iOS starting in August
This gist, based in part on a gist by Brian Hartvigsen, allows you to export from Authy your TOTP tokens you have stored there.
Those can be "standard" 6-digits / 30 secs tokens, or Authy's own version, the 7-digits / 10 secs tokens.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |