TL;DR
Install Postgres 9.6, and then:
sudo pg_dropcluster 9.6 main --stop
sudo pg_upgradecluster 9.5 main
sudo pg_dropcluster 9.5 main
cordova plugin add https://github.com/brodysoft/Cordova-SQLitePlugin.git |
apt-get install python-pygraphviz | |
pip install django-extensions | |
# add 'django_extensions' to INSTALLED_APPS in settings.py | |
python manage.py graph_models trees -o test.png |
# Here's your list of choices that would be displayed in a drop-down | |
# element on the web. It needs to be a tuple, and we define this | |
# as a variable just for readability/convenience. | |
# | |
# This example has 3 choices, each of which consists of two parts: | |
# 1. the thing that get strored in your database | |
# 2. the thing that you see in a dropdown list | |
LABEL_CHOICES = ( | |
('this gets stored in your database', 'This item is what you see in the drop-down'), | |
('django', 'Django'), |
TL;DR
Install Postgres 9.6, and then:
sudo pg_dropcluster 9.6 main --stop
sudo pg_upgradecluster 9.5 main
sudo pg_dropcluster 9.5 main
defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Max (editable)" 80 | |
defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" 48 | |
defaults write com.apple.BluetoothAudioAgent "Apple Initial Bitpool (editable)" 40 | |
defaults write com.apple.BluetoothAudioAgent "Negotiated Bitpool" 48 | |
defaults write com.apple.BluetoothAudioAgent "Negotiated Bitpool Max" 53 | |
defaults write com.apple.BluetoothAudioAgent "Negotiated Bitpool Min" 48 | |
defaults write com.apple.BluetoothAudioAgent "Stream - Flush Ring on Packet Drop (editable)" 30 | |
defaults write com.apple.BluetoothAudioAgent "Stream - Max Outstanding Packets (editable)" 15 | |
defaults write com.apple.BluetoothAudioAgent "Stream Resume Delay" "0.75" |
import xlsxwriter | |
from io import BytesIO | |
from django.http import StreamingHttpResponse | |
from django.views.generic import View | |
def get_foo_table_data(): | |
""" | |
Some table data | |
""" |
[ | |
{ | |
"name": "Arica", | |
"code": "15101", | |
"provincia": "Arica", | |
"region": "Arica y Parinacota", | |
"region_number": "XV", | |
"region_iso_3166_2": "CL-AP" | |
}, | |
{ |
from django import forms | |
from django.core import validators | |
from django.core.exceptions import ValidationError | |
class MinLengthValidator(validators.MinLengthValidator): | |
message = 'Ensure this value has at least %(limit_value)d elements (it has %(show_value)d).' | |
class MaxLengthValidator(validators.MaxLengthValidator): | |
message = 'Ensure this value has at most %(limit_value)d elements (it has %(show_value)d).' |
############################################################################## | |
# | |
# Simple Python program to benchmark several Python Excel writing modules. | |
# | |
# python bench_excel_writers.py [num_rows] [num_cols] | |
# | |
# | |
import sys | |
from time import clock |
/* | |
* Copyright (c) 2017 Emil Davtyan | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining | |
* a copy of this software and associated documentation files (the | |
* "Software"), to deal in the Software without restriction, including | |
* without limitation the rights to use, copy, modify, merge, publish, | |
* distribute, sublicense, and/or sell copies of the Software, and to | |
* permit persons to whom the Software is furnished to do so, subject to | |
* the following conditions: |