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
""" | |
Restructures Slack chat export files so that the messages are now grouped per user | |
(normally the export is grouped per channel) | |
Not actually useful or anything :) Mainly just for fun so you can generate a | |
wordcloud per user, then play the "guess whose wordcloud is this?"-game | |
Usage: fill in INPUT_DIR and OUTPUT_DIR, then run the script.. | |
- See this R script to create wordclouds from a chat export: |
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
"1_3" \ | |
"__2" | | |
"_00" |=> filter "000": output = {"_00", "0__", "00_"} | |
"_1_" | | |
"0__" |=> filter "123": output = {"1_3", "_2_", "1__"} | |
"_2_" | | |
"_01" |=> filter "__0": output = {"_00", "_1_", "0__", "_2_", "1__", "00_", "_20", "1_0"} | |
"1__" | | |
"00_" |=> filter "10_": output = {"1_3", "__2", "_00", "_01", "1__", "1_1", "_03", "1_2", "1_0"}, | |
"1_1" | |
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
package de.thm.move | |
import java.awt.{MouseInfo, Robot} | |
import javafx.scene.input.{KeyCode, MouseButton} | |
import org.junit.Test | |
import org.junit.Assert._ | |
class DrawRectangleTest extends GuiTest { |
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 java.util | |
import ArithmeticParser.{BinaryOperators, Parentheses} | |
import ArithmeticParser.BinaryOperators.BinaryOperator | |
import scala.util.control.Breaks._ | |
object ArithmeticParser { | |
object Parentheses extends Enumeration { |
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
object SandwichShop { | |
trait Sandwich { | |
def getPrice: Double | |
def getIngredients: Array[String] | |
} | |
class CheeseSandwich extends SandwichShop.Sandwich { | |
override def getPrice = 2 | |
override def getIngredients: Array[String] = Array[String]("bread", "cheese") |
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 java.awt.Dimension | |
import scala.swing.BorderPanel.Position | |
import scala.swing.event.ButtonClicked | |
import scala.swing.{BorderPanel, Button, GridPanel, MainFrame, TextField} | |
object Calculator { | |
def main(args: Array[String]): Unit = { | |
val frame = new MainFrame() { |
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 java.text.SimpleDateFormat | |
import java.util.Date | |
object Clock { | |
val TIME_24 = 0 | |
val TIME_US = 1 | |
val TIME_UNIX = 2 | |
def main(args: Array[String]): Unit = { | |
val c = new Clock |
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 scala.swing._ | |
import scala.swing.BorderPanel.Position | |
class TextEd extends MainFrame { | |
// Window title | |
title = "Swing text editor" | |
// Window size | |
preferredSize = new Dimension(640, 480) | |
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
package nl.tudelft.jpacman; | |
import java.awt.event.KeyEvent; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.util.List; | |
import com.google.java.contract.Ensures; | |
import com.google.java.contract.Invariant; | |
import com.google.java.contract.Requires; |
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
package be.ac.vub.patterns; | |
public class SandwichShop { | |
public static interface Sandwich { | |
public double getPrice(); | |
public String[] getIngredients(); | |
} | |
public static class CheeseSandwich implements Sandwich { |
NewerOlder