My Python Scrapbook
Preface
Scrapbook
Me
Conventions
You
References
Getting started
keywords
del
keywords
assert
raise
exec
nonlocal
Debugging
Debuggers
pdb debugger
pudb debugger
ipdb debugger
pylint debugger
Git
Git best practice
local shared repo
PyGithub
Testing
doctest module
unittest module
nose module
pytest module
setUp and tearDown
logging module
mock module
virtualenv
virtualenvwrapper
searching installed packages
Distribution
Distributing python scripts
setuptools module
setup.py: data files
setup.py: versions
setup.py execution
setup.py: documentation
setup.py: README
setup.py: file structure
Register with PyPI
Licensing
OOP
UML
UML object diagram
UML sequence diagram
UML class diagram
Classes and Instantiation
Attributes of a class
Encapsulation
Static Methods
Class Methods
Inheritance
Super
Composition
Overriding
Closures
Decorators pt1
Decorators pt2
Decorators pt3
Properties
Factories
Lambda
Multiple Inheritance
Analysis
Plotting
Scatterplot
Boxplot
Barcharts
Piechart
Histogram
Poisson distribution
Normal distribution
Colour fill density plot
Plotting horizontal lines
Timeseries
Timeseries using pandas
Best fit polynomial
Realtime plotting
Group of histograms
Scatterplot ellipse
Installing basemap
Basemap: contourf and quiver
Data
Linspace
Random integers
Range of numbers
Convert string fraction to decimal
Pandas: modify values in a column
Pandas: read and write csv
Analysis
Multiple regression
Principle components analysis (PCA)
Test if two lists overlap
Stats test decision key (1 response and 1 variable)
web scraping
requests.get
BeautifulSoup and href elements
Kivy
Install
Basic App
KV Language
Boxlayout
Chaining Boxlayouts
Resizing Boxlayout
Resizing Heights
Font Size
Padding
Button on_press Quit
Button on_press Action
Button on_press Multi-action
Button on_release Action
Deploy
Deploy Log
Matplotlib Backend
Matplotlib using kv language
Matplotlib adding graph widgets
Matplotlib adding to existing plots
Matplotlib redraw plots
pelican
Databases
SQLite
Getting started with sqlite
Entity Relationship diagram
Create Table
Add column to table
Adding mulitple records
Query Records
Bulk Import
Foreign Keys
Join Query
Group and Sum
Default Timestamp
Group and Sum on Multiple Joins
Query all records
Many to many relationship
Query many to many relationships
Sqlite3 command line options
MySQL
Getting started with MySQL
Query unique objects of a column
SQL
SQL quick reference
CREATE INSERT INTO and UPDATE
three ways to join tables
JOIN(s)
self join
subqueries
correlated subqueries
conditional aggregates
dates
common table expression
LIKE
REGEXP
SUBSTR (mysql)
UNION and CONCAT
CREATE VIEW
hdf5
netcdf4
sql magic
Django
getting started with django
create database backend
create model
django shell
admin
create view
templates
query foreign key relationships
static files
null and blank
basic form
forms with foreign keys
href link to urls.py
filter foreign keys in views.py
create html table
refactor html templates using base.html
register users
login user
auto login with registration
logout button
flush database
extending the User model
update another table via form
unique together
forms for adding or selecting records
form checkbox
form dateselector widget
display field choice as part of a string
stop forms from requiring a manytomany selection
custom template filters
stop overprocessing views
pass 2 variables in an href URL pattern
access form elements to render to the current html template
html modal popup window
Quick reference for HTML JS and CSS
add download button
form queryset: sort field by name
form queryset: queries spanning multiple relationships
modal forms using django variables
crispy forms
django-bootstrap3-datetimepicker
login with AuthenticationForm
PasswordChangeForm
add buttons to crispy forms
add a back button to crispy form
smart select forms
omit a button from a form (sometimes)
access object by foreign key in an html template
using views to provide queryset to a form
create group
form errors
int() argument must be a string or a number not QueryDict
let users create their own groups
let users delete groups
filter queryset using values_list
custom view decorators
model charfield validators
filter using a complex query operator Q
RaspberryPi
install error - check disk
install rpi image to microsd card
set up DHCP server
set up hadoop cluster
mount drive on boot
Install MySQL
Projects
operation pylint
devowel vowels
template builder
format my string
playing with circles
Documentation
pelican basics
Powered by
GitBook
Getting started
Getting started
results matching "
"
No results matching "
"