- Install docker
- Install socat (see install.sh)
- Install XQuartz from https://www.xquartz.org
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" Trains an agent with (stochastic) Policy Gradients on Pong. Uses OpenAI Gym. """ | |
import numpy as np | |
import cPickle as pickle | |
import gym | |
# hyperparameters | |
H = 200 # number of hidden layer neurons | |
batch_size = 10 # every how many episodes to do a param update? | |
learning_rate = 1e-4 | |
gamma = 0.99 # discount factor for reward |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I've tested it on Fedora 23 and Ubuntu 16.04. I'm using gcc-5.3.1, python-3.4, VS Code-1.14.0 | |
You can debug mixed Python/C++ in the same GUI. It also works for MPI applications. You can switch between the debuggers and corresponding call stacks. | |
1. Packages needed | |
1) Visual Studio Code | |
2) Extensions for VS Code: | |
"Python" from Don Jayamanne (I'm using 0.6.7) | |
This allows VS Code act as the front end to debug python. | |
This gives VS Code ability to attach to a python script that uses module "ptvsd". |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ pandoc -s -f markdown -t man README.md | man -l - | |
$ pandoc -s -f markdown -t html README.md |lynx -dump -stdin | less - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stackargs=$@ | |
shbin="$(which sh)" | |
if [ -z "$shbin" ] || [[ "$shbin" =~ "not found" ]]; then | |
echo "Couldn't find sh, exiting." | |
exit 1 | |
else | |
echo "Found sh: $shbin" | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
# import matplotlib | |
# matplotlib.use('Agg') | |
import matplotlib.pyplot as plt | |
from matplotlib import animation, rc | |
from IPython.display import HTML, Image | |
import seaborn # for background grid | |
seaborn.set() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://snack.expo.io/HynFGjcyf | |
import React, { Component } from 'react'; | |
import { | |
StyleSheet, | |
Text, | |
View, | |
Easing, | |
Animated, | |
// Button, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Updating xcode-install | |
Fetching: xcode-install-2.2.1.gem (100%) | |
/Users/antonmatosov/.rbenv/versions/2.2.6/lib/ruby/gems/2.2.0/gems/xcode-install-2.2.1/bin/🎉 maybe `gem pristine xcode-install` will fix it? | |
Successfully installed xcode-install-2.2.1 | |
antonmatosov@Antons-MBP ~/> gem pristine xcode-install | |
Restoring gems to pristine condition... | |
/Users/antonmatosov/.rbenv/versions/2.2.6/lib/ruby/gems/2.2.0/gems/xcode-install-2.1.1/bin/🎉 maybe `gem pristine xcode-install` will fix it? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)viewWillAppear:(BOOL)animated { | |
[super viewWillAppear:animated]; | |
[[NSNotificationCenter defaultCenter] | |
addObserver:self | |
selector:@selector(keyboardWillChangeFrame:) | |
name:UIKeyboardWillChangeFrameNotification object:nil]; | |
} | |
- (void)viewDidDisappear:(BOOL)animated { | |
[super viewDidDisappear:animated]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSUInteger PSPDFHashFromCGRect(CGRect rect) { | |
return (*(NSUInteger *)&rect.origin.x << 10 ^ *(NSUInteger *)&rect.origin.y) + (*(NSUInteger *)&rect.size.width << 10 ^ *(NSUInteger *)&rect.size.height); | |
} |