Skip to content

Instantly share code, notes, and snippets.

View max-vogler's full-sized avatar

Max Vogler max-vogler

View GitHub Profile

Keybase proof

I hereby claim:

  • I am max-vogler on github.
  • I am maxvogler (https://keybase.io/maxvogler) on keybase.
  • I have a public key ASAsr_xYT0zvZxdQg3mDvngk_J09taafn-ViuHGWCGN8yQo

To claim this, I am signing this object:

from collections import Counter
from fileinput import input
for index, line in enumerate(input()):
if index == 0:
continue
(n, p) = map(int, line.split())
spaces = Counter([n])
@max-vogler
max-vogler / titanic_nn.py
Created March 24, 2017 17:09
Solving the Titanic challenge using Keras, a Neural Network, basic feature engineering, and 10-fold cross validation
import re
import numpy as np
import pandas as pd
from keras.layers import Dense, Dropout
from keras.models import Sequential
from keras.wrappers.scikit_learn import KerasClassifier
from sklearn.metrics import accuracy_score
from sklearn.model_selection import StratifiedKFold, cross_val_score
using System;
using System.IO;
using System.Net;
using Microsoft.WindowsAzure.Storage;
namespace ProxyTest
{
public class ProxyTest
{
@max-vogler
max-vogler / TravellingSalesMan.kt
Created February 5, 2016 14:19
Solving the Travelling Salesman Problem with Kotlin and JGraphT (done for AdventOfCode day 9)
// use regular Java imports: Kotlin is 100% compatible to Java
import org.jgrapht.DirectedGraph
import org.jgrapht.Graph
import org.jgrapht.graph.SimpleDirectedGraph
/**
* A class defining an Edge in the Graph. The `val`s are automatically accessible via getters.
* Additionally, the annotation `data`automatically generates equals(), hashcode() and more.
*/
data class Edge(val source: String, val target: String, val duration: Int)
@max-vogler
max-vogler / FizzBuzz.kt
Last active April 20, 2016 14:53
Shortest Kotlin FizzBuzz Code Golf
fun main(a:Array<String>){(1..100).map{i->println(mapOf(0 to i,i%3 to "Fizz",i%5 to "Buzz",i%15 to "FizzBuzz")[0])}}