Visit my blog or connect with me on Twitter
git init
or
Visit my blog or connect with me on Twitter
git init
or
| #!/usr/bin/env bash | |
| # Script to Build Python 3.6.3 for Ubuntu 16.04 | |
| # | |
| # Ubuntu 16.04 is and LTS release with Python for System use locked at 3.5 | |
| # This script builds Python3.6 from source and installs it in /usr/local | |
| # | |
| # Called from my VagrnantFile as | |
| # config.vm.provision :shell, inline: "bash /var/www/myproj/VagrantScripts/BuildPython36.sh" | |
| # | |
| # Inspired by the wonderful instructions at |
| Simplified Django deploy using Apache HTTP Server. |
Andy Thomason is a Senior Programmer at Genomics PLC. He has been witing graphics systems, games and compilers since the '70s and specialises in code performance.
| from django.contrib import admin | |
| from django.contrib.auth import admin as auth_admin | |
| from .models import * | |
| from forms import UserChangeForm, UserCreationForm | |
| class UserAdmin(auth_admin.UserAdmin): | |
| fieldsets = ( | |
| (None, {'fields': ('email', 'password')}), | |
| ('Personal info', {'fields': ('first_name', 'last_name', 'twitter', 'photo', 'event')}), |
| {% extends "base.html" %} | |
| {% block content %} | |
| <form method="post">{% csrf_token %} | |
| {{ forms.subscription }} | |
| <input type="submit" value="Subscribe"> | |
| </form> | |
| <form method="post">{% csrf_token %} | |
| {{ forms.contact }} | |
| <input type="submit" value="Send"> |
Using Powershell (see https://docs.microsoft.com/en-us/windows/wsl/install-win10 for more information)
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
(see https://docs.microsoft.com/en-us/windows/wsl/wsl2-install )
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
| yum install epel-release | |
| yum install gcc openssl-devel bzip2-devel libffi libffi-devel | |
| yum install ncurses-devel th-devel readline-devel sqlite-devel | |
| yum install gdbm-devel uuid-devel xz-devel python3-devel python3-setuptools | |
| libc6-dev v zlib1g-dev | |
| yum install wget | |
| cd /root | |
| wget https://www.python.org/ftp/python/3.7.7/Python-3.7.7.tgz |
| #At a shell prompt (in a terminal), run | |
| sudo apt-get update \ | |
| && sudo apt-get install -y build-essential git libexpat1-dev libssl-dev zlib1g-dev \ | |
| libncurses5-dev libbz2-dev liblzma-dev \ | |
| libsqlite3-dev libffi-dev tcl-dev linux-headers-generic libgdbm-dev \ | |
| libreadline-dev tk tk-dev wget | |
| git clone https://github.com/python/cpython.git | |
| cd cpython && ./configure --prefix=/usr \ | |
| --enable-loadable-sqlite-extensions \ |