-
Open Bash console in PythonAnywhere
-
Make project directory
-
Setup virtualenv
virtualenv --python=python3.6 venv . venv/bin/activate -
Install Django
pip install django
| // Merit API spec: | |
| // https://www.merit.ee/juhend/muud/Merit_Aktiva_API_specification.pdf | |
| // Install required packages: | |
| // npm install crypto-js moment request request-debug | |
| const CryptoJS = require('crypto-js'); | |
| const moment = require('moment'); | |
| const axios = require('axios') | |
| const json2csv = require('json2csv').parse; |
| ack-grep __unicode --ignore-dir=venv -l | xargs sed -i 's/__unicode/__str/g' |
| // See API spec here: | |
| // https://www.merit.ee/juhend/muud/Merit_Aktiva_API_specification.pdf | |
| var CryptoJS = require('crypto-js'); | |
| var request = require('request'); | |
| require('request-debug')(request); | |
| var moment = require('moment'); | |
| var API_KEY = '...'; | |
| var API_ID = '...'; |
| find . -name models.py | xargs sed -i 's/\(ForeignKey(\w\+\)/\1, on_delete=models.CASCADE/; s/\(OneToOneField(\w\+\)/\1, on_delete=models.CASCADE/' |
Open Bash console in PythonAnywhere
Make project directory
Setup virtualenv
virtualenv --python=python3.6 venv
. venv/bin/activate
Install Django
pip install django
| from django.core.mail import send_mass_mail | |
| subject = 'test subject' | |
| message = 'test message' | |
| from_email = '[email protected]' | |
| recipient_list = ['[email protected]', '[email protected]', '[email protected]'] | |
| messages = [(subject, message, from_email, [recipient]) for recipient in recipient_list] | |
| send_mass_mail(messages) |
| set -e | |
| set -u | |
| CERT_HOSTNAME=www.example.com | |
| # create private CA key | |
| openssl genrsa -out $CERT_HOSTNAME-CA.key 2048 | |
| # create private CA certificate |
| <build> | |
| <plugins> | |
| <plugin> | |
| <groupId>org.codehaus.mojo</groupId> | |
| <artifactId>build-helper-maven-plugin</artifactId> | |
| <version>1.12</version> | |
| <executions> | |
| <execution> | |
| <id>add-integration-test-sources</id> | |
| <phase>generate-test-sources</phase> |
| --- /c/Python27/lib/CGIHTTPServer.py 2015-11-02 16:20:08.000000000 +0200 | |
| +++ CGIHTTPServer.py 2017-02-06 23:05:09.734462300 +0200 | |
| @@ -103,6 +103,11 @@ | |
| head, tail = os.path.splitext(path) | |
| return tail.lower() in (".py", ".pyw") | |
| + def is_perl(self, path): | |
| + """Test whether argument path is a Perl script.""" | |
| + head, tail = os.path.splitext(path) | |
| + return tail.lower() in (".pl") |
| package util; | |
| import org.apache.log4j.Logger; | |
| import org.springframework.util.StopWatch; | |
| public class DebugLogStopwatch implements AutoCloseable { | |
| Logger logger; | |
| StopWatch stopwatch; |