Skip to content

Instantly share code, notes, and snippets.

@Entity
@Table(name = "users")
public class User {
@Id
@Column(nullable = false, length = 50)
private String username;
@Column(nullable = false, length = 50)
private String password;
case class SomeType[+T: TypeTag](val int: Int) {
def paramInfo[U >: T](x: U): Unit = {
val targs = typeOf[T] match { case TypeRef(_, _, args) => args }
println(s"Type of $x has type arguments $targs")
}
}
@aalexandrov
aalexandrov / SerializedFormatExample.scala
Created January 29, 2015 10:56
The TypeSerializerInputFormat throws the following exception: The type returned by the input format could not be automatically determined.
import org.apache.flink.api.common.functions.RichFlatMapFunction
import org.apache.flink.api.common.typeinfo.BasicTypeInfo
import org.apache.flink.api.java.io.{TypeSerializerInputFormat, TypeSerializerOutputFormat}
import org.apache.flink.api.java.typeutils.TupleTypeInfo
import org.apache.flink.api.java.{ExecutionEnvironment, _}
import org.apache.flink.core.fs.FileSystem.WriteMode
import org.apache.flink.util.Collector
object SerializedFormatExample {

Applications Used in Evaluation Sections of Large-Scale Graph & Iterative Processing Systems Papers (sorted by frequency)

Application Appears In
PageRank (and variations) 1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24
Connected Components (and variations) 1 , 2, 6, 12, 13, 15, 16, 17, 19, 22, 23, 24
SSSP (and variations) 3, 6, 7, 10, 13, 14, 17, 22, 24
ALS 7, 14, 21, 23, 24
Belief Propagation (and variations) 4, 20, 21, 23, 24
Graph Coloring 7, 10, 12, 20
@aalexandrov
aalexandrov / NOTICE.template
Last active April 4, 2016 11:27
NOTICE template
Copyright 2016, TU Berlin.
This project includes software developed by TU Berlin.
http://www.tu-berlin.de/
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
@aalexandrov
aalexandrov / experiments.kmeans.xml
Last active September 2, 2015 13:17
ExperimentSequence with multiple parameters example
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.springframework.org/schema/beans"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<!-- Preamble: Data Generators, Data Sets, Outputs, Experiments -->
<!--************************************************************************
* Suites
*************************************************************************-->
import scala.util.control.TailCalls._
def time[R](block: => R): (Long, R) = {
val t0 = System.nanoTime()
val result = block // call-by-name
val t1 = System.nanoTime()
(t1 - t0, result)
}
val sin1 = (x: Double) => {
@aalexandrov
aalexandrov / stream.scala
Last active April 24, 2017 05:34
Stream API Playground
/*
* Copyright © 2014 TU Berlin (emma@dima.tu-berlin.de)
*
* 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
@aalexandrov
aalexandrov / qgm.dsl
Last active February 13, 2022 12:31
Exploration of a possible DSL for user-readable Query Graph Model (QGM) instances.
Model {
box B1 = Get {
id: GlobalId::User(0),
unique_keys: [[0], [1]],
columns: [
base(0): INT NOT NULL,
base(1): INT NOT NULL,
base(2): INT NOT NULL,
]
}
@aalexandrov
aalexandrov / example.rs
Last active February 15, 2022 22:09
Method overloading in Rust
#[derive(Debug)]
struct Container {
x: i32,
y: usize,
}
trait Contains<T> {
fn get(&self) -> &T;
fn set(&mut self, value: T);
}