Skip to content

Instantly share code, notes, and snippets.

View kstrempel's full-sized avatar
🏠
Working from home

Kai Strempel kstrempel

🏠
Working from home
View GitHub Profile
@kstrempel
kstrempel / gist:4948351cfe439b93f81c4d1205f675cd
Last active April 6, 2021 16:27
Generate v0.2 cloud event and parse it as 1.0
//DEPS io.cloudevents:cloudevents-api:1.3.0
import io.cloudevents.CloudEvent;
import io.cloudevents.v02.CloudEventBuilder;
import io.cloudevents.v1.CloudEventImpl;
import io.cloudevents.json.Json;
import com.fasterxml.jackson.core.type.TypeReference;
import java.net.URI;
class CloudEventTest {
@kstrempel
kstrempel / gist:3b2f707c2f9019e55f4721b3a80cfbf2
Last active January 27, 2021 16:01
Running OpenAI with in Clojure and libpython-clj
(ns pyclojure.core
(:gen-class)
(:require [libpython-clj.require :refer [require-python]]
[libpython-clj.python :as py]))
; import gym
; env = gym.make('CartPole-v0')
; for i_episode in range(20):
; observation = env.reset()
; for t in range(100):
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kstrempel
kstrempel / Simple Keras XOR
Created January 4, 2018 16:33
A very simple Keras XOR Modell and training and testing
from keras.models import Sequential
from keras.layers import Dense
from keras.optimizers import SGD
X = [[0.0, 0.0],
[0.0, 1.0],
[1.0, 0.0],
[0.0, 0.0]]
Y = [[0.0],

Keybase proof

I hereby claim:

  • I am kstrempel on github.
  • I am kstrempel (https://keybase.io/kstrempel) on keybase.
  • I have a public key whose fingerprint is 62A4 7764 56C9 5F8B A862 B806 619E D378 2536 022A

To claim this, I am signing this object: