This modem is also sold as a MegaFon M150-2 USB dongle
Install the needed packages via opkg
tool
opkg update
import django_filters | |
class CommaSeparatedValueFilter(django_filters.CharFilter): | |
"""Accept comma separated string as value and convert it to list. | |
It's useful for __in lookups. | |
""" | |
def filter(self, qs, value): |
class WithoutNoneFieldsSerializer(serializers.ModelSerializer): | |
""" Exclude model fields which are ``None``. | |
This eventually includes foreign keys and other special fields. | |
Source: https://gist.github.com/Karmak23/5a40beb1e18da7a61cfc | |
""" | |
def to_native(self, obj): |
class DRFLoggerMixin(object): | |
""" | |
Allows us to log any incoming request and to know what's in it. | |
Usage: | |
class MyOwnViewSet(DRFLoggerMixin, | |
mixins.ListModelMixin, | |
… | |
viewsets.GenericViewSet): |
#!/bin/bash | |
### USAGE | |
### | |
### ./ElasticSearch.sh 1.7 will install Elasticsearch 1.7 | |
### ./ElasticSearch.sh will fail because no version was specified (exit code 1) | |
### | |
### CLI options Contributed by @janpieper | |
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch |
"""Here's how you implement Foo(pkid) with postgres.orm 2.1.x. | |
Discovered at PyTennesse with @wlphoenix @PederSchacht et al. | |
""" | |
class Foo(Model): | |
typname = 'foo' | |
def __new__(cls, pkid_or_record): |
Install and register the FreeTDS driver for unixODBC.
apt-get install tdsodbc
odbcinst -i -d -f /usr/share/tdsodbc/odbcinst.ini
(Optional) Test the DSN-less connection with pyodbc.
apt-get install python-pyodbc
>>> import pyodbc
# Probably excessive, but it makes these instructions simpler | |
sudo -i | |
# Add postgresql repo and update apt listing | |
echo "deb http://apt.postgresql.org/pub/repos/apt/ squeeze-pgdg main" > /etc/apt/sources.list.d/pgdg. | |
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - | |
apt-get update | |
# For some reason this is necessary with PostgreSQL on Ubuntu 12.04 | |
update-alternatives --remove postmaster.1.gz /usr/share/postgresql/9.1/man/man1/postmaster.1.gz |
The Neo4j Manual is versioned and released together with the product. An overview of parts of the documentation workflow is found in the manual itself, in the chapter Writing Neo4j Documentation. We use several different approaches to verify our documentation by tests running in CI when the product is built. Testing as much as possible of examples especially makes sense, as we also provide ways to interactively play with Neo4j, see for example Create nodes and relationships.
The documentation toolchain also makes sure that all cross references have valid targets.
The core tools for our documentation are AsciiDoc and DocBook.