Skip to content

Instantly share code, notes, and snippets.

View Phuket2's full-sized avatar

Ian Joicey Phuket2

  • Pattaya, Thailand
View GitHub Profile
@Phuket2
Phuket2 / tmpPaYJ8A.py
Created December 23, 2015 18:26
tmpPaYJ8A.py
import ui
'''
dict of dicts
key == x.__class.__name__
value = dict of the defaults for the object
'''
_std_defaults = \
{
'Button' : {
'tint_color': 'blue',
@Phuket2
Phuket2 / UiWrapper.py
Created December 30, 2015 17:57
UiWrapper.py
# coding: utf-8
import ui
import inspect
import sys
import os
import copy
import warnings
@Phuket2
Phuket2 / pyui_load.py
Created January 10, 2016 15:06
pyui_load.py
# coding: utf-8
# coding: utf-8
import ui
import os
class PYUILoaderStr(ui.View):
'''
@Phuket2
Phuket2 / reminders_style_ui.py
Created February 9, 2016 09:32
reminders_style_ui.py
# coding: utf-8
import ui
from collections import namedtuple
import string
MasterRec = namedtuple('MasterRec', 'title,image,accessory_type')
_interface_bg = 'navy'
@Phuket2
Phuket2 / PygmentsHelper.py
Created February 16, 2016 17:20
PygmentsHelper.py
# coding: utf-8
import ui
from pygments import highlight
from pygments.formatters import HtmlFormatter
from pygments.styles import get_style_by_name
from pygments.lexers import get_lexer_by_name
from pygments.styles import get_all_styles
"""
@Phuket2
Phuket2 / code_view.py
Created March 1, 2016 11:29
code_view.py
# coding: utf-8
import ui
from pygments import highlight
from pygments.formatters import HtmlFormatter
from pygments.styles import get_style_by_name
from pygments.lexers import get_lexer_by_name
from pygments.styles import get_all_styles
class CodeDisplay(ui.View):
@Phuket2
Phuket2 / PageIndicatorPosted.py
Created March 10, 2016 11:29
PageIndicatorPosted.py
# coding: utf-8
import ui
'''
Date: 10 March 2016
Pythonista 2.01 beta
PageIndicator Class
===================
An attempt to mimick the page indicator found in some iOS interfaces
supports circles/rects, defaults to circles.
@Phuket2
Phuket2 / Indcator.py
Created March 12, 2016 18:34
Indcator.py
# coding: utf-8
import ui
import time
from math import pi, sin, cos, radians
# a dict for kwargs shortcuts
_indicator_attr_short_cuts = \
{
'cw' : 'cell_width',
@Phuket2
Phuket2 / CalView2.py
Created March 23, 2016 12:38
CalView2.py
# coding: utf-8
# coding: utf-8
import calendar
import datetime as dt
import ui
class CalendarView(ui.View): #here
def __init__(self,fldname,dateval,action=None, *args, **kwargs): #here
@Phuket2
Phuket2 / Cir.py
Created April 14, 2016 17:41
Cir.py
# coding: utf-8
import ui
# Pythonista Forum - @Phuket2
# for @ccc , should be pep8 ok and pyflakes :)
# No break through here. just expanded on the Pythonista help
# code for ui.ImageContext
# draw text in a circle, and return a ui.image