Skip to content

Instantly share code, notes, and snippets.

@balachandrana
balachandrana / 3dtut10.py
Created March 30, 2017 03:36
3dtut10.py
from objc_util import *
import ui
import math
load_framework('SceneKit')
SCNView, SCNScene, SCNBox ,SCNNode, SCNMaterial, SCNCamera, SCNLookAtConstraint , SCNLight, SCNPlane= map(ObjCClass, ['SCNView', 'SCNScene', 'SCNBox' ,'SCNNode', 'SCNMaterial', 'SCNCamera', 'SCNLookAtConstraint', 'SCNLight', 'SCNPlane'])
class SCNVector3 (Structure):
_fields_ = [('x', c_float), ('y', c_float), ('z', c_float)]
@balachandrana
balachandrana / pathsLists.py
Created April 1, 2017 07:03
pathsLists.py
l = [[[[(265.0, -15.0), (348.0, -15.0), (405.0, 38.0), (438.0, 100.0)],
[(438.0, 100.0), (438.0, 0.0)],
[(438.0, 0.0), (488.0, 0.0)],
[(488.0, 0.0), (488.0, 460.0)],
[(488.0, 460.0), (438.0, 460.0)],
[(438.0, 460.0), (438.0, 362.0)],
[(438.0, 362.0), (406.0, 422.0), (350.0, 470.0), (265.0, 470.0)],
[(265.0, 470.0), (162.0, 470.0), (59.0, 388.0), (59.0, 226.0)],
[(59.0, 226.0), (59.0, 60.0), (168.0, -15.0), (265.0, -15.0)]],
[[(265.0, 31.0), (169.0, 31.0), (109.0, 116.0), (109.0, 225.0)],
import ui
def closepage(sender):
v.close()
def function_1(sender):
v['label1'].text = 'Oh! You clicked my button.'
#uncomment or comment lines below based on platform
#v = ui.MainView(frame=(0, 0, 600, 450)) # kivy
@balachandrana
balachandrana / analyze_tamil_poem.py
Created November 24, 2020 16:07
analyze tamil poem
# -*- coding: utf-8 -*-
from collections import defaultdict
import re
class AsaiMaps():