Use $this to refer to the current object. Use self to refer to the current class. In other words, use $this->member for non-static members, use self::$member for static members.
Source: When to use self vs this -stackoverflow
Use $this to refer to the current object. Use self to refer to the current class. In other words, use $this->member for non-static members, use self::$member for static members.
Source: When to use self vs this -stackoverflow
<?php | |
use Faker\Factory as Faker; | |
abstract class ApiTester extends TestCase { | |
/** | |
* @var Faker | |
*/ | |
protected $fake; |
<?php | |
use Swagger\Annotations as SWG; | |
/** | |
* @SWG\Swagger( | |
* basePath="/v1", | |
* host="api.local", | |
* schemes={"http"}, | |
* produces={"application/json"}, |
I implemented the DQN model from this paper: https://www.cs.toronto.edu/~vmnih/docs/dqn.pdf.
I used a simple network with two hidden layers and an output layer, instead of the CNN described in the paper due to the relative simplicity of the Cart-Pole environment compared to Atari games.
Note, that I did not yet implement the target network described in the more recent paper here: https://storage.googleapis.com/deepmind-data/assets/papers/DeepMindNature14236Paper.pdf.
The results vary from run to run, sometimes taking 1000 episodes to solve the problem, and at other times taking only 200 episodes.
PHP handling on apache is done via modules of one sort or another, and running multiple version is problematic on a single instance. The solution is to run two instances of apache on the same machine. This allows one instance to run PHP 7 (the default on 16.04), and another can run PHP 5. Since normal http/https is on ports 80 and 443, the second instance will run on ports 81 and 444. Since it is running on the same machine, all file system and database access is the exact same.
All the commands herein have to be run as root, or with sudo
prefixed to the command.
Read /usr/share/doc/apache2/README.multiple-instances
Run sh ./setup-instance php5
from /usr/share/doc/apache2/examples
, where php5
is the suffix for the second site; all commands for the second site will have that suffix. This will keep all of the same configuration for all sites on the new instance, including SSL certif
image: savjee/docker-s3website-git-ftp-deploy | |
pipelines: | |
default: | |
- step: | |
script: | |
- git ftp init --user $FTP_USERNAME --passwd $FTP_PASSWORD ftp://s1.closemarketing.net/domains/domain.com/public_html/ |