Skip to content

Instantly share code, notes, and snippets.

View muety's full-sized avatar
🤓

Ferdinand Mütsch muety

🤓
View GitHub Profile
@muety
muety / HelloSwing.java
Last active June 8, 2016 08:42
HelloSwing - SWT 1 Tut 3 Example
import java.awt.*;
import java.awt.image.*;
import java.io.File;
import java.io.IOException;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.ImageIcon;
import javax.swing.JComboBox;
import javax.swing.JFrame;
public class ConcurrentCounterSample {
public static void main(String[] args) throws InterruptedException {
final int NUM_THREADS = 2;
MyCounter counter = new MyCounter();
Thread[] threads = new Thread[NUM_THREADS];
int i;
long startTime = System.currentTimeMillis();
'use strict';
const fs = require('fs');
const SEARCH_CLASS = 'http://yago-knowledge.org/resource/wikicat_Towns_in_Baden-Württemberg';
const FILE = './KPClasses-Yago2-22.txt';
let weights = [];
function func(line) {
if (line.indexOf(SEARCH_CLASS) === 0) {
'use strict';
const fs = require('fs');
const FILE1 = './dbr_Karlsruhe_properties.txt';
const FILE2 = './KPProperties-DBpedia39-22.txt';
const CLUSTER = 1;
let properties = {};
let result = [];
@muety
muety / berlin.json
Created January 16, 2017 20:46
Property Ranking dbr:Berlin
{
"http://dbpedia.org/property/description":0.025624229311943,
"http://dbpedia.org/ontology/elevation":0.912037393798431,
"http://dbpedia.org/ontology/PopulatedPlace/areaTotal":0.303861208756765,
"http://dbpedia.org/ontology/leaderParty":0.611218462189038,
"http://dbpedia.org/property/population":4.0748501565555735,
"http://dbpedia.org/ontology/demonym":0.23427369594574,
"http://dbpedia.org/property/leader":0.094248300542434,
"http://dbpedia.org/ontology/country":0.920875578125318,
"http://dbpedia.org/ontology/leaderTitle":0.540366853872935,

Keybase proof

I hereby claim:

  • I am n1try on github.
  • I am n1try (https://keybase.io/n1try) on keybase.
  • I have a public key ASBe0EvMz6BK5OOp5iOHy0vMXVGqtLq3ZMlJ2zNgOz6oBwo

To claim this, I am signing this object:

@muety
muety / largest_prime_factor.go
Last active April 26, 2017 19:23
Delta Karlsruhe Gewinnspiel
package main
import (
"fmt"
"time"
)
func main() {
N := int64(751395478255)
n := N
@muety
muety / chan_example.go
Created May 16, 2017 19:07
Example for channels, inspired by vansimke's YouTube tutorial
// https://play.golang.org/p/Y8eaSkYNgG
package main
import (
"fmt"
)
const (
logDebug = "DEBUG"
@muety
muety / simple_nn.go
Last active August 24, 2017 12:30
Simple Neural Network in Go
/* Simple neural net with one hidden layer consisting of one neuron */
/* Inspired by https://medium.com/technology-invention-and-more/how-to-build-a-simple-neural-network-in-9-lines-of-python-code-cc8f23647ca1 */
package main
import (
"fmt"
"math/rand"
"math"
)
@muety
muety / http_jsonrpc.go
Last active August 24, 2017 12:31
Go JSON-RPC over HTTP
package main
import (
"io"
"log"
"net"
"net/http"
"net/rpc"
"net/rpc/jsonrpc"
)