Skip to content

Instantly share code, notes, and snippets.

View freakboy3742's full-sized avatar

Russell Keith-Magee freakboy3742

View GitHub Profile
@freakboy3742
freakboy3742 / keybase.md
Created March 7, 2014 08:10
Keybase verification

Keybase proof

I hereby claim:

  • I am freakboy3742 on github.
  • I am freakboy3742 (https://keybase.io/freakboy3742) on keybase.
  • I have a public key whose fingerprint is CBE7 4366 F6CA 0A0D 4BA7 D2F8 3D2D AB6A 37BB 5BC3

To claim this, I am signing this object:

@freakboy3742
freakboy3742 / cricket.py
Created March 28, 2015 01:01
Sample tree-using Toga project.
#!/usr/bin/env python
from __future__ import print_function, unicode_literals, absolute_import
import toga
if __name__ == '__main__':
def build(app):
main_container = toga.Container()
@freakboy3742
freakboy3742 / django-mailer.patch
Created September 8, 2015 19:31
Patch to get django-mailer working
diff --git a/django/contrib/admin/checks.py b/django/contrib/admin/checks.py
index d8f7fe5..7a7c651 100644
--- a/django/contrib/admin/checks.py
+++ b/django/contrib/admin/checks.py
@@ -560,9 +560,10 @@ class ModelAdminChecks(BaseModelAdminChecks):
id='admin.E105',
)
]
- elif not issubclass(inline.model, models.Model):
- return must_be('a Model', option='%s.model' % inline_label,
@freakboy3742
freakboy3742 / Bag suggestions
Last active October 5, 2015 08:22
Suggestions for laptop bags
Recommended:
Booq http://www.booqbags.com/us/backpacks
Tom Bihn http://www.tombihn.com/laptop-bags/TB0111.html
LL Bean http://global.llbean.com/shop/Ridge-Runner-25-Day-Pack/88843.html
Targus
Timbuk2
Thule http://www.thule.com.au/details.php?p_id=854&listid=36&slistid=&seo=(New)_TCBP-417____32_Litre_Laptop_Backpack
Everki http://www.everki.com
Found; looks interesting:
@freakboy3742
freakboy3742 / Myobject.py
Created December 11, 2015 00:38
Python 3 class definitions for fun and profit
class JavaClass:
# Details go here
pass
class JavaInterface:
# Details go here
pass
@freakboy3742
freakboy3742 / Metaclass.py
Created December 11, 2015 00:50
Py3 Metaclasses for fun and profit
class JavaClass:
# Details go here
pass
class JavaInterface:
# Details go here
pass
@freakboy3742
freakboy3742 / example.py
Created December 11, 2015 12:14
Another VOC milestone
class MyStringAnalog(implements=java.lang.CharSequence):
def __init__(self, value):
self.value = value
def charAt(self, index: int) -> char:
return 'x'
def length(self) -> int:
return len(self.value)
@freakboy3742
freakboy3742 / Object.java
Created December 17, 2015 11:04
Why I like Python, volume 3742
package org.python.java;
public class Object extends org.python.types.Object {
static
// public static org.python.Object convert(java.lang.Object java) {
// if (java instanceof java.lang.String) {
// return new org.python.types.Str((java.lang.String) java);
// } else {
// return new org.python.java.Object(java);
@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