Skip to content

Instantly share code, notes, and snippets.

encela95dus

Block or report user

Report or block encela95dus

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View customslider.py
import ui
class CustomSlider(ui.View):
def __init__(self,*args,**kwargs):
super().__init__(*args, **kwargs)
@property
def value(self):
return self.__value
View moveimage.py
import ui
class MoveView(ui.View):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.current_location = None
self.image = ui.Image('test:Mandrill')
self.iv = ui.ImageView(image=self.image)
self.add_subview(self.iv)
View interactive_quiz.py
import ui
questions = [('Which is the smallest planet in the solar system?',
('mercury', 'mars', 'saturn'), 0),
('which one is the moon of the saturn?',
('io', 'enceladus', 'europa'), 1),
('Which is the largest planet in the solar system?',
('mercury', 'mars', 'jupiter'), 2)]
class QuizDialog(object):
View sketch2.py
'''
A very simple drawing 'app' that demonstrates
custom views and saving images to the camera roll.
'''
import ui
import photos
import console
# The PathView class is responsible for tracking
@encela95dus
encela95dus / navtest_mainview.pyui
Created Aug 15, 2018
simple_navigation_view.py
View navtest_mainview.pyui
[
{
"class" : "View",
"attributes" : {
"name" : "Main View",
"background_color" : "RGBA(1.000000,1.000000,1.000000,1.000000)",
"tint_color" : "RGBA(0.000000,0.478000,1.000000,1.000000)",
"enabled" : true,
"border_color" : "RGBA(0.000000,0.000000,0.000000,1.000000)",
"flex" : ""
View navtest_mainview.pyui
[
{
"class" : "View",
"attributes" : {
"name" : "Main View",
"background_color" : "RGBA(1.000000,1.000000,1.000000,1.000000)",
"tint_color" : "RGBA(0.000000,0.478000,1.000000,1.000000)",
"enabled" : true,
"border_color" : "RGBA(0.000000,0.000000,0.000000,1.000000)",
"flex" : ""
View cards.py
import scene
import random
import ui
import sound
class Block(scene.SpriteNode):
for effect in ['Click_1', 'Click_2', 'Coin_2', 'Coin_5']:
sound.load_effect(effect)
w, h = (96, 96) # (64, 64)
View moreorless.js
$(document).ready(function() {
$('a.moreorless').click(function() {
var $firstPara = $('p:eq(1)');
$firstPara.slideToggle('slow');
var $link = $(this);
if ( $link.text() == "read more" ) {
$link.text('read less');
} else {
$link.text('read more');
}
View pyui_dialog.pyui
[
{
"class" : "View",
"attributes" : {
"background_color" : "RGBA(1.000000,1.000000,1.000000,1.000000)",
"tint_color" : "RGBA(0.000000,0.478000,1.000000,1.000000)",
"enabled" : true,
"border_color" : "RGBA(0.000000,0.000000,0.000000,1.000000)",
"flex" : ""
},
@encela95dus
encela95dus / Dropbox File Picker V2.py
Last active Mar 16, 2019
Dropbox File Picker V2.py
View Dropbox File Picker V2.py
#!python3
#original code https://gist.github.com/omz/fb180c58c94526e2c40b
#bosco added changes dropbox 2 functionality
#minor edits done to run in python3
#see forum post https://forum.omz-software.com/topic/4425/dropbox-file-picker-needs-update
# IMPORTANT SETUP INSTRUCTIONS:
#
# 1. Go to http://www.dropbox.com/developers/apps (log in if necessary)
# 2. Select "Create App"
# 3. Select the following settings:
You can’t perform that action at this time.