This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Pong Example | |
// | |
// Implements a basic version of the classic game for two players. | |
// Swipe up and down on the left to move the left paddle, and | |
// swipe on the right side for the right paddle. | |
// | |
// Tip: If the editor freezes while you type, | |
// turn off "Auto Run" in the settings. | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Quick Text Example | |
// | |
// Enables you to text quickly by defining standard messages. | |
// | |
// 1. Add the ability to delete messages | |
// 2. Add the most recent message at the top | |
// | |
open System |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Tip Calculator Example | |
// | |
// Calculates a tip and total given a bill amount | |
// | |
open System; | |
open Xamarin.Forms; | |
let clr1 = Color.FromRgb (150, 200, 190) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Plotting Example | |
// | |
// Demonstrates the use of OxyPlot to plot functions. | |
// | |
open System | |
open System.Linq | |
open OxyPlot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Map Example for Continuous | |
// | |
// Displays a point on a map | |
// | |
// Experiments: | |
// 1. Change the coordinate to your home | |
// 2. Add more pins | |
// 3. Change the map type to a satellite view | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ui | |
from time import sleep | |
import editor | |
import types | |
import console | |
''' | |
This script runs ok forever if it's the only script you run. | |
Other scripts may also be run if you only run this one once. | |
But if you run this 2 or more times any other script you try to run thereafter will lock up. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#example of animated frames for a character walk. | |
#downloads a soldier sprite sheet, cuts out frames for the walk cycles in 4 directions | |
# and animates the character walking in the direction controlled by gravity. | |
from scene import * | |
from PIL import Image | |
import urllib, os | |
start = Point(3, 1) #the sheet has 8 sets of characters in a 4x2 grid. | |
ssize = Size(96, 128) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Modified Particles sample to show rotating rectangles. | |
import canvas | |
from scene import * | |
from random import random | |
from colorsys import hsv_to_rgb | |
from threading import Thread, Event | |
p_size = 64 | |
mt = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#https://gist.github.com/GuyCarver/4173534 | |
from scene import * | |
import feedparser | |
from time import sleep | |
import random | |
import Queue | |
from threading import Thread, Event | |
fontsize = 25 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#paste clipboard to buffer. | |
import clipboard | |
import editor | |
cliptext = clipboard.get() | |
if cliptext != '': | |
text = editor.get_text() | |
selection = editor.get_selection() | |
selected_text = text[selection[0]:selection[1]] | |
replacement = cliptext + selected_text |
NewerOlder