Skip to content

Instantly share code, notes, and snippets.

View freakboy3742's full-sized avatar

Russell Keith-Magee freakboy3742

View GitHub Profile
@freakboy3742
freakboy3742 / tale-of-two-mobiles.rst
Created December 20, 2015 04:43
A tale of two mobiles: the state of Python on Android and iOS

Description

It was the best of times, it was the worst of times, it was the age of foolishness, it was the epoch of belief, it was the season of Python popularity, it was the season of Python not being available on an important platform.

So reads the history of the last 5 years of Python. Python is enjoying a surge in popularity due to it's features as a language; but "desktop/server" split that dominated the 80s, 90s and 2000s has been joined by a third player - mobile devices such as phones and tablets - and Python doesn't have a good story for those devices.

Although there hasn't been much to say in the past, the good news is that over the last year, there's been some signficant changes in the landscape, and Python on Mobile is now teetering on the brink of being a genuine reality.

@freakboy3742
freakboy3742 / tale-of-two-cellphones.rst
Last active January 1, 2016 05:40
A tale of two mobiles: Python on Android and iOS

A tale of two cellphones: Python on Android and iOS

Python is enjoying a surge in popularity due to it's features as a language. However, over the last 10 years, mobile platforms have increased in importance, and Python doesn't have a good story on these platforms.

In this talk, Dr Russell Keith-Magee will give a technical dive into the work the BeeWare project has been doing to make Python as simple to use on Mobile as it is on other platforms.

Python Level

@freakboy3742
freakboy3742 / beyond-web-2.0.rst
Last active January 1, 2016 05:51
Beyond Web 2.0 - Django and Python in the modern web ecosystem

Beyond Web 2.0 - Django and Python in the modern web ecosystem

Django is over 10 years old; but the web that it was built for doesn't really exist any more. Yes, we still need to rapidly develop database-backed websites, and we still need those sites to use AJAX, but the modern web is faced with new problems, and new challenges. Many of those challenges involve interacting with devices that aren't desktop machines, and platforms that aren't a traditional browser - places where Python isn't a first-class citizen.

Does this mean we have to abandon Django and Python for other frameworks and languages? Can we keep using Python and Django on the server side and interact with independent client side frameworks? Or can we push Python and Django into these new environments?

In this talk, Dr Russell Keith-Magee will explore the problems, and some potential solutions, to these problems.

Objectives

@freakboy3742
freakboy3742 / rapid-mobile-development.rst
Last active December 8, 2022 11:22
Rapid Mobile Application Development with Python

Rapid mobile application development with Python

While there are examples of Python-based apps in mobile App stores, the knowledge of how to actually create a mobile app in Python hasn't been well documented, or simplified for mass use - until now.

In this talk, Dr Russell Keith-Magee will demonstrate a collection of tools from the BeeWare Project that enable you to build a cross-platform mobile app using Python in a matter of minutes.

Audience

@freakboy3742
freakboy3742 / voctestapp.py
Last active December 8, 2022 11:21
An Android app written in Python
from android.util import TypedValue
from android.view import ViewGroup
from android.view import Gravity
from android.widget import LinearLayout
from android.widget import TextView
from android.widget import EditText
from android.widget import Button
from android.widget import ScrollView
from android.util import Log
@freakboy3742
freakboy3742 / Runtime output
Created January 13, 2016 06:39
C++ parser failure
State : 0
Stack : . LexToken(CLASS,'class',2,1)
Action : Reduce rule [declaration_seq_opt -> <empty>] with [] and goto state 2
Result : <NoneType @ 0x1033a0da8> (None)
State : 2
Stack : declaration_seq_opt . LexToken(CLASS,'class',2,1)
Action : Reduce rule [util -> <empty>] with [] and goto state 3
Result : <NoneType @ 0x1033a0da8> (None)
@freakboy3742
freakboy3742 / API dump
Created January 20, 2016 13:51
Example Python API for clang
=== sample.cpp
CursorKind.TRANSLATION_UNIT (type:TypeKind.INVALID | result type:TypeKind.INVALID) sample.cpp
CursorKind.CLASS_DECL (type:TypeKind.RECORD | result type:TypeKind.INVALID) Foo
CursorKind.CXX_ACCESS_SPEC_DECL (type:TypeKind.INVALID | result type:TypeKind.INVALID)
CursorKind.CONSTRUCTOR (type:TypeKind.FUNCTIONPROTO | result type:TypeKind.VOID) Foo
CursorKind.PARM_DECL (type:TypeKind.INT | result type:TypeKind.INVALID) x
CursorKind.COMPOUND_STMT (type:TypeKind.INVALID | result type:TypeKind.INVALID)
CursorKind.FUNCTION_DECL (type:TypeKind.FUNCTIONPROTO | result type:TypeKind.RECORD) factory
CursorKind.TYPE_REF (type:TypeKind.RECORD | result type:TypeKind.INVALID) class Foo
CursorKind.PARM_DECL (type:TypeKind.INT | result type:TypeKind.INVALID) x
@freakboy3742
freakboy3742 / android.py
Last active October 23, 2019 16:30
One app, three platforms...
import android
from android.app import AlertDialog
from android.graphics import Color
from android.graphics.drawable import ColorDrawable
from android.os import AsyncTask
from android.os import Looper
from android.os import Handler
from android.util import TypedValue
from android.view import View
from android.view import MenuItem
@freakboy3742
freakboy3742 / application.rst
Last active May 17, 2016 01:51
MOSS Mission Partner Grant application

MOSS Mission Partner Grant application

Project name

BeeWare

Your name

@freakboy3742
freakboy3742 / JAR first
Created July 9, 2016 08:14
Tarfile oddity...
hammer:github rkm$ tar ztvf dist/Python-3.4-Android-support.b1.tar.gz
drwxr-xr-x 0 0 0 0 9 Jul 16:12 libs/
-rw-r--r-- 0 0 0 161831 9 Jul 16:12 libs/python-android-support.jar
-rw-r--r-- 0 0 0 29 9 Jul 16:12 support.version
hammer:github rkm$ python3
Python 3.4.2 (default, Apr 25 2015, 09:25:15)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import zipfile
>>> zipfile.is_zipfile('dist/Python-3.4-Android-support.b1.tar.gz')