Github will be the main account and bitbucket the secondary.
ssh-keygen -t rsa -C "github email"
Enter passphrase when prompted. If you see an option to save the passphrase in your keychain, do it for an easier life.
# Manually execute first: sudo -i | |
# Usage: wget -q -O - "$@" https://gist.githubusercontent.com/tsaqib/c8915096c7fde8ade3971ff51f764da7/raw/ --no-cache | sh | |
# After installation, codebase can be found at /usr/lib/python2.7/dist-packages/openerp | |
apt-get update -y && apt-get upgrade -y | |
wget http://nightly.odoo.com/extra/wkhtmltox-0.12.1.2_linux-jessie-amd64.deb | |
dpkg -i wkhtmltox-0.12.1.2_linux-jessie-amd64.deb | |
apt-get install -f | |
rm wkhtmltox-0.12.1.2_linux-jessie-amd64.deb | |
wget -O - https://nightly.odoo.com/odoo.key | apt-key add - |
# original post http://askubuntu.com/questions/831262/how-to-install-pgadmin-4-in-desktop-mode-on-ubuntu-16-04 | |
sudo apt-get install python3-venv python3-pip libpq-dev python3-dev | |
mkdir myVenvs | |
cd myVenvs | |
pyvenv pgadmin4-ve | |
source pgadmin4-v/bin/activate | |
wget https://ftp.postgresql.org/pub/pgadmin3/pgadmin4/v1.1/pip/pgadmin4-1.1-py3-none-any.whl |
import uuid | |
import timeit | |
import lz4 | |
import os | |
from timeit import Timer | |
import sys | |
import blosc | |
DATA = open(sys.argv[1], "rb").read() | |
LZ4_DATA = lz4.block.compress(DATA) |
import os | |
import io | |
from PIL import Image | |
from django.core.urlresolvers import reverse | |
from django.conf import settings | |
from rest_framework import status | |
from rest_framework.test import APITestCase |
In your models.py put:
from django.db import models
@classmethod
def model_field_exists(cls, field):
try:
cls._meta.get_field(field)
return True
--- a/platforms/android/cordova/lib/emulator.js 2018-08-08 12:34:38.000000000 +0200 | |
+++ b/platforms/android/cordova/lib/emulator.js 2018-08-08 14:14:35.000000000 +0200 | |
@@ -187,7 +187,7 @@ | |
var api_level = avd.target.match(/\d+/); | |
if (api_level) { | |
var level = android_versions.get(api_level); | |
- avd.target = 'Android ' + level.semver + ' (API level ' + api_level + ')'; | |
+ avd.target = 'Android ' + (level ? level.semver : '') + ' (API level ' + api_level + ')'; | |
} | |
} |
Here is my django-coverage walkthrough. A nice minimal sample project showing django-coverage in action is https://github.com/pydanny/django-party-pack | |
1) Add to requirements.txt: | |
django-coverage==1.2 | |
coverage==3.4 | |
2) In your virtualenv, do a "pip install -r requirements.txt" | |
3) Add to settings.py: |