Setting Django up to use MySQL

MySQL support is simple to add. In your DATABASES dictionary, you will have an entry like this: DATABASES = { ‘default’: { ‘ENGINE’: ‘django.db.backends.mysql’, ‘NAME’: ‘DB_NAME’, ‘USER’: ‘DB_USER’, ‘PASSWORD’: ‘DB_PASSWORD’, ‘HOST’: ‘localhost’, # Or an IP Address that your DB is hosted on ‘PORT’: ‘3306’, } } You also have the option of utilizing MySQL … Read more

Python Requests – How to use system ca-certificates (debian/ubuntu)?

From https://stackoverflow.com/a/33717517/1695680 To make python requests use the system ca-certificates bundle, it needs to be told to use it over its own embedded bundle export REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt Requests embeds its bundles here, for reference: /usr/local/lib/python2.7/site-packages/requests/cacert.pem /usr/lib/python3/dist-packages/requests/cacert.pem Or in newer versions use additional package to obtain certificates from: https://github.com/certifi/python-certifi To verify from which file certificates are loaded, … Read more

CUDA incompatible with my gcc version

As already pointed out, nvcc depends on gcc 4.4. It is possible to configure nvcc to use the correct version of gcc without passing any compiler parameters by adding softlinks to the bin directory created with the nvcc install. The default cuda binary directory (the installation default) is /usr/local/cuda/bin, adding a softlink to the correct … Read more

No module named _sqlite3

It seems your makefile didn’t include the appropriate .so file. You can correct this problem with the steps below: Install sqlite-devel (or libsqlite3-dev on some Debian-based systems) Re-configure and re-compiled Python with ./configure –enable-loadable-sqlite-extensions && make && sudo make install Note The sudo make install part will set that python version to be the system-wide … Read more

What’s the difference of section and segment in ELF file format

But what’s difference between section and segment? Exactly what you quoted: the segments contain information needed at runtime, while the sections contain information needed during linking. does a segment contain one or more sections? A segment can contain 0 or more sections. Example: readelf -l /bin/date Elf file type is EXEC (Executable file) Entry point … Read more