Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(8)  |  Call(4)  |  Derive(0)  |  Import(4)

src/s/k/skdb-HEAD/doc/proposals/package_play.py   skdb(Download)
 
#load a screw
screw_package = skdb.load_package("screw")
screws = screw_package.load(open(os.path.join(settings.package_path("screw"),"data.yaml")),only_classes="<class 'screw.Screw'>") #load from "data.yaml"
#print out your screws if you want
#load a bearing
#the bearing package at the moment is a dummy package and isn't really important
bearing_pack = skdb.load_package("bearing")
stuff = open(os.path.join(settings.package_path("bearing"),"data.yaml"))
bearings = bearing_pack.load(stuff, only_classes="<class 'bearing.Bearing'>") #how can this be simplified?
 
#load a lego
lego_pack = skdb.load_package("lego")
legos = lego_pack.load()
for lego in legos:

src/s/k/skdb-HEAD/doc/proposals/techniques.py   skdb(Download)
#!/usr/bin/python
from copy import copy, deepcopy
from skdb.core.yamlcrap import *
from skdb import Unit, Vector, Process, load_package
import unittest
    def test_press(self):
        lego_pack = load_package("lego")
        lego_pack.load_data()
        part1 = deepcopy(lego_pack.parts[0])
        part2 = deepcopy(lego_pack.parts[0])

src/s/k/skdb-HEAD/tests/test_mating.py   skdb(Download)
import unittest, math
from skdb.geom import *
from skdb import load_package, Package, close_enough
class TestMating(unittest.TestCase):
    def test_part_mating(self):

src/s/k/skdb-HEAD/tests/test_gui.py   skdb(Download)
import unittest, math
from skdb.geom import *
from skdb import load_package, Package, close_enough
 
#well, i dunno how to verify these except by looking

src/s/k/skdb-HEAD/tests/test_geom.py   skdb(Download)
import unittest, math
from skdb.geom import *
from skdb import load_package, Package, close_enough
 
#for test_shape_volume