Skip to content

Instantly share code, notes, and snippets.

Matthias Plappert matthiasplappert

Block or report user

Report or block matthiasplappert

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View example.py
import numpy as np
import gym
env = gym.make('FetchReach-v0')
# Simply wrap the goal-based environment using FlattenDictWrapper
# and specify the keys that you would like to use.
env = gym.wrappers.FlattenDictWrapper(
env, dict_keys=['observation', 'desired_goal'])
View example.py
import numpy as np
import gym
env = gym.make('FetchReach-v0')
obs = env.reset()
done = False
def policy(observation, desired_goal):
# Here you would implement your smarter policy. In this case,
@matthiasplappert
matthiasplappert / ddpg_train.py
Created Mar 22, 2016
A quick sketch of computing the gradient and updating the actor in the Deep DPG algorithm (Lillicrap et al., 2015)
View ddpg_train.py
from keras import backend as K
actor = None # the following code assumes that actor and critic are Graph networks
critic = None
action_input_name = 'input_action'
output_name = 'output'
batch_size = 64
# Temporarily connect to a large, combined model so that we can compute the gradient and monitor
# the performance of the actor as evaluated by the critic.
View ENV.md

This script automatically sets up my vim environment on any machine. For example in a docker container or an EC2 instance.

Dependencies

  • wget
  • vim
  • git

Usage

View uikonf2014-slides.md
View keybase.md

Keybase proof

I hereby claim:

  • I am matthiasplappert on github.
  • I am mplappert (https://keybase.io/mplappert) on keybase.
  • I have a public key whose fingerprint is BC81 5B1C 87B4 4B43 9C1D 3811 20F2 600F 217E C448

To claim this, I am signing this object:

@matthiasplappert
matthiasplappert / gist:9493050
Last active Aug 29, 2015
QuickLook Debugging for `UIView`
View gist:9493050
@interface UIView (MPAdditions)
@end
@implementation UIView (MPAdditions)
- (id)debugQuickLookObject {
if (self.bounds.size.width < 0.0f || self.bounds.size.height < 0.0f) {
return nil;
}
View Test.java
import java.io.File;
import java.io.IOException;
public final class Test {
private Test() {
}
public static void main(String[] args) {
try {
View gist:2575964
#!/bin/sh
java -classpath your/path/to/checkstyle/checkstyle-5.5/checkstyle-5.5-all.jar com.puppycrawl.tools.checkstyle.Main -c your/path/to/checkstyle_swt1.xml -r src/
View nullteiler.rb
menge = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
menge.each do |x|
if x != 0 then
menge.each do |y|
if y != 0 then
if ((x * y) % menge.length == 0) then
print x.to_s + " * " + y.to_s + " % " + menge.length.to_s + " = 0\n"
end
end
end
You can’t perform that action at this time.