Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View mbalunovic's full-sized avatar

Mislav Balunovic mbalunovic

  • ETH Zurich
  • Zurich
View GitHub Profile
@mbalunovic
mbalunovic / cartpole_q_network.py
Created September 11, 2017 06:23
Q-Network, CartPole
import gym
import keras
import numpy as np
import random
from gym import wrappers
from keras.models import Sequential
from keras.layers import Dense
from keras.optimizers import Adam
@mbalunovic
mbalunovic / gist:73399
Created March 3, 2009 16:49
line segment - point distance
#include <cstdio>
#include <algorithm>
#include <iostream>
#include <cstring>
#include <cmath>
using namespace std;
struct point {
int x,y;
@mbalunovic
mbalunovic / gist:72267
Created March 1, 2009 08:09
line segments intersection
#include <cstdio>
#include <algorithm>
#include <cmath>
using namespace std;
struct point {
double x,y;
point ( double x = 0, double y = 0 ) : x(x),y(y) {}
};
@mbalunovic
mbalunovic / gist:72044
Created February 28, 2009 18:29
dijkstra
#include <cstdio>
#include <iostream>
#include <set>
#include <vector>
using namespace std;
#define MAXN 100005
#define INF 100000000