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 / 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 / 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 / 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 / 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 / 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 / tmpPfL16j.py
Created December 20, 2015 07:47
tmpPfL16j.py
f_str = [
{
"selected" : False,
"frame" : "{{0, 0}, {320, 480}}",
"class" : "View",
"nodes" : [
{
"selected" : False,
"frame" : "{{0, 233}, {320, 32}}",
"class" : "Label",
@Phuket2
Phuket2 / SlidePanelClass.py
Created December 19, 2015 16:21
SlidePanelClass.py
# coding: utf-8
'''
code copied from dialogs.py Pythonista 1.6 beta, @omz (Ole Zorn)
specially the parts of the code that present a datepicker
in a dialog with animation and a shield of the dialogs contents
a few mods made
'''
_country_list = ['Afghanistan', 'Albania', 'Algeria', 'American Samoa', 'Andorra', 'Angola', 'Anguilla', 'Antarctica', 'Antigua and Barbuda', 'Argentina', 'Armenia', 'Aruba', 'Australia', 'Austria', 'Azerbaijan', 'Bahamas', 'Bahrain', 'Bangladesh', 'Barbados', 'Belarus', 'Belgium', 'Belize', 'Benin', 'Bermuda', 'Bhutan', 'Bolivia', 'Bosnia and Herzegovina', 'Botswana', 'Brazil', 'Brunei Darussalam', 'Bulgaria', 'Burkina Faso', 'Burundi', 'Cambodia', 'Cameroon', 'Canada', 'Cape Verde', 'Cayman Islands', 'Central African Republic', 'Chad', 'Chile', 'China', 'Christmas Island', 'Cocos (Keeling) Islands', 'Colombia', 'Comoros', 'Democratic Republic of the Congo (Kinshasa)', 'Congo, Republic of (Brazzaville)', 'Cook Islands', 'Costa Rica', 'Ivory Coast', 'Croatia', 'Cuba', '
@Phuket2
Phuket2 / CreateTestFile.py
Last active December 9, 2015 08:03
CreateTestFile.py
# coding: utf-8
# *** DISCLAIMER PLEASE READ ***
# please understand, i am a newbie. being a newbie,
# my code may be crap or worse buggy
# i still like to share. it could be useful code.
# or parts of could be useful
# but i like the feedback
@Phuket2
Phuket2 / pragmas.py
Created November 28, 2015 18:43
pragmas.py
# coding: utf-8
# *** DISCLAIMER PLEASE READ ***
# please understand, i am a newbie. being a newbie,
# my code may be crap or worse buggy
# i still like to share. it could be useful code.
# or parts of could be useful
# but i like the feedback
@Phuket2
Phuket2 / pragmas.py
Created November 28, 2015 18:43
pragmas.py
# coding: utf-8
# *** DISCLAIMER PLEASE READ ***
# please understand, i am a newbie. being a newbie,
# my code may be crap or worse buggy
# i still like to share. it could be useful code.
# or parts of could be useful
# but i like the feedback