This file contains hidden or 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
# RayCast | |
# Simple raycasting based renderer | |
# Touch the left part to rotate, and touch the right part to move forward | |
# Coded in a few hours during my holidays, July 2014, straight from my iPhone - thanks Pythonista !!! | |
# Feel free to upgrade ! | |
# Enjoy ! | |
# Emmanuel ICART | |
# [email protected] | |
from scene import * |
This file contains hidden or 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 requests | |
import photos | |
import speech | |
import ui | |
from PIL import Image | |
def button_tapped(sender): | |
myphoto = photos.capture_image() | |
myphoto.resize((800, 600)) | |
myphoto.save('test.jpg') |
This file contains hidden or 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 requests | |
import photos | |
import speech | |
import ui | |
from PIL import Image | |
def button_tapped(sender): | |
myphoto = photos.capture_image() | |
myphoto.resize((800, 600)) | |
myphoto.save('test.jpg') |
This file contains hidden or 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
from scene import * | |
import ui | |
import random | |
import numpy as np | |
import speech | |
import time | |
def gradient_descent_line_fitter(x, y, learning_rate = 0.02, stop_criteria = 1e-4, max_iter = 10000): | |
scaling_factor = 100.0 |
This file contains hidden or 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
from scene import * | |
import ui | |
import random | |
import numpy as np | |
import speech | |
import time | |
def gradient_descent_line_fitter(x, y, learning_rate = 0.02, stop_criteria = 1e-4, max_iter = 10000): | |
scaling_factor = 100.0 |
This file contains hidden or 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
from scene import * | |
import ui | |
import random | |
import numpy as np | |
import speech | |
import time | |
def gradient_descent_line_fitter(x, y, learning_rate = 0.02, stop_criteria = 1e-6, max_iter = 100000): | |
scaling_factor = 100.0 |
This file contains hidden or 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 | |
import random | |
import numpy as np | |
rabbit_size = 50 | |
v = ui.View(background_color=('#bcdeff')) | |
board = ui.View() | |
v.add_subview(board) | |
v.present('full_screen', hide_title_bar=False , orientations=['landscape']) | |
board.frame = (v.width-v.height + rabbit_size/2, rabbit_size/2 , v.height - rabbit_size, v.height - rabbit_size) |
This file contains hidden or 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 | |
import random | |
import numpy as np | |
rabbit_size = 50 | |
v = ui.View(background_color=('#bcdeff')) | |
board = ui.View() | |
v.add_subview(board) | |
v.present('full_screen', hide_title_bar=False , orientations=['landscape']) | |
board.frame = (v.width-v.height + rabbit_size/2, rabbit_size/2 , v.height - rabbit_size, v.height - rabbit_size) |
This file contains hidden or 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 | |
import random | |
import numpy as np | |
rabbit_size = 50 | |
v = ui.View(background_color=('#bcdeff')) | |
board = ui.View() | |
v.add_subview(board) | |
v.present('full_screen', hide_title_bar=False , orientations=['landscape']) | |
board.frame = (v.width-v.height + rabbit_size/2, rabbit_size/2 , v.height - rabbit_size, v.height - rabbit_size) |
This file contains hidden or 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 | |
import random | |
import numpy as np | |
rabbit_size = 50 | |
v = ui.View(background_color=('#bcdeff')) | |
board = ui.View() | |
v.add_subview(board) | |
v.present('full_screen', hide_title_bar=False , orientations=['landscape']) | |
board.frame = (v.width-v.height + rabbit_size/2, rabbit_size/2 , v.height - rabbit_size, v.height - rabbit_size) |
NewerOlder