create the file /etc/init/ipfs.conf, with the following contents:
description "ipfs-daemon"
author "Joe Bloggs"
start on started mountall
stop on shutdown
# automatically respawn| """ 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 |
| /** | |
| * Base contract that all upgradeable contracts should use. | |
| * | |
| * Contracts implementing this interface are all called using delegatecall from | |
| * a dispatcher. As a result, the _sizes and _dest variables are shared with the | |
| * dispatcher contract, which allows the called contract to update these at will. | |
| * | |
| * _sizes is a map of function signatures to return value sizes. Due to EVM | |
| * limitations, these need to be populated by the target contract, so the | |
| * dispatcher knows how many bytes of data to return from called functions. |
create the file /etc/init/ipfs.conf, with the following contents:
description "ipfs-daemon"
author "Joe Bloggs"
start on started mountall
stop on shutdown
# automatically respawn| let hasBlobConstructor = typeof(Blob) !== 'undefined' && (function () { | |
| try { | |
| return Boolean(new Blob()); | |
| } catch (e) { | |
| return false; | |
| } | |
| }()); | |
| let hasArrayBufferViewSupport = hasBlobConstructor && typeof(Uint8Array) !== 'undefined' && (function () { | |
| try { |
| """ | |
| Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
| BSD License | |
| """ | |
| import numpy as np | |
| # data I/O | |
| data = open('input.txt', 'r').read() # should be simple plain text file | |
| chars = list(set(data)) | |
| data_size, vocab_size = len(data), len(chars) |
| server { | |
| listen 443 ssl; | |
| server_name xxx.xx.io | |
| ssl on; | |
| ssl_certificate /etc/asterisk/certs/xxx.io.pem; | |
| ssl_certificate_key /etc/asterisk/certs/xxx.io.key; | |
| ssl_session_timeout 5m; |
| public class Solution { | |
| public ArrayList<String> wordBreak(String s, Set<String> dict) { | |
| ArrayList<String> sentences = new ArrayList<String>(); | |
| if (s == null || dict == null) return sentences; | |
| wordBreak(s, dict, "", sentences); | |
| return sentences; | |
| } | |
| private void wordBreak(String s, Set<String> dict, String sentence, ArrayList<String> sentences) { |
Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.
For the sake of this example, let’s pretend the subfolder containing your site is named dist.
Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).
| /** | |
| * $.unserialize | |
| * | |
| * Takes a string in format "param1=value1¶m2=value2" and returns an object { param1: 'value1', param2: 'value2' }. If the "param1" ends with "[]" the param is treated as an array. | |
| * | |
| * Example: | |
| * | |
| * Input: param1=value1¶m2=value2 | |
| * Return: { param1 : value1, param2: value2 } | |
| * |