Did I find the right examples for you? yes no

All Samples(53)  |  Call(32)  |  Derive(0)  |  Import(21)
The `Relation` class represents a logical, temporal or spacial dependency
between two :class:`Task`s, and is part of a workload managed by Troy.

Relation instances are created and owned by the :class:`Workload` class they
are part of -- only that class should change its composition and state.
Relations are created according to a :class:`RelationDescription`, i.e.
a set of key-value pairs describing the represented task dependency.

src/a/f/afewords_base-HEAD/afewords/aflib/article/catalog.py   afewords_base(Download)
from about import About
from generator import *
from relation import Relation
 
from authority import *
    def recommend_article(self, node_id, article_obj):
        if self.get_node_dict(node_id)['title'] is None:
            return None
        rr = Relation(attrs={"relation_type":"catalog-%s" % \
                            article_obj.cls_name})
    def recommend_subcatalog(self, node_id, subcatalog_obj):
        rr = Relation(attrs={"relation_type":"catalog-%s" % \
                            subcatalog_obj.__class__.__name__})
        rr.set_relation_set(self, subcatalog_obj)
        tmp = self.get_node_list(node_id, 'catalogs')
        tmp = tmp_lib[str(catalog_obj._id)+'#'+node_id]
        if tmp is not None:
            return Relation(_id=tmp)
        rr = catalog_obj.recommend_subcatalog(node_id, self)
        tmp_lib[str(catalog_obj._id)+'#'+node_id] = rr._id
    def get_relations_from_node(self, lib_type, node_id):
        '''lib_type: articles, main, catalogs'''
        from relation import Relation
        rids = self.lib.node_info_lib.\
            sub_dict(node_id).sub_dict(lib_type).load_all()

src/s/p/splicer-0.1.0/splicer/compilers/local.py   splicer(Download)
from ..ast import *
from ..aggregate import Aggregate
from ..relation import Relation
from ..operations import view_replacer, walk
from ..schema_interpreter import (
  def alias(ctx):
    relation = operation.relation(ctx)
    return Relation(
      relation.schema.new(name=operation.name),
      iter(relation)
 
    return Relation(
      schema,
      (
        tuple( col(row, ctx) for col in columns )
  def selection(ctx):
    relation = operation.relation(ctx)
    predicate  = value_expr(operation.bool_op, relation, dataset)
    return Relation(
      relation.schema,
    # can use the new schema. value_expr should just
    # take the schema as an arg...
    bogus = Relation(schema, None)
 
 

src/s/p/splicer-HEAD/splicer/compilers/local.py   splicer(Download)
from ..ast import *
 
from ..relation import Relation
from ..operations import view_replacer, walk
from ..schema_interpreter import (
  def alias(ctx):
    relation = operation.relation(ctx)
    return Relation(
      relation.schema.new(name=operation.name),
      iter(relation)
 
    return Relation(
      schema,
      (
        tuple( col(row, ctx) for col in columns )
 
    return Relation(
      relation.schema,
      (
        row
    # can use the new schema. value_expr should just
    # take the schema as an arg...
    bogus = Relation(schema, None)
 
 

src/s/p/splicer-0.1.0/splicer/functions/filesystem.py   splicer(Download)
import os
from os.path import join
from itertools import chain
 
from ..relation import Relation
 
  return Relation(
    Schema(relation.schema.fields + [dict(type='BINARY', name=content_column)]),
    (
      row + (open(row[field_pos]).read(), )
 
  return Relation(
    schema,
    (
      r + tuple(s)
 
  return Relation(
    Schema([dict(type="STRING", name=filename_column)]),
    (
      (join(root,f), )
        yield row + m.groups()
 
  return Relation(schema, extract())
 
 

src/s/p/splicer-HEAD/splicer/functions/filesystem.py   splicer(Download)
import os
from os.path import join
from itertools import chain
 
from ..relation import Relation
 
  return Relation(
    Schema(relation.schema.fields + [dict(type='BINARY', name=content_column)]),
    (
      row + (open(row[field_pos]).read(), )
 
  return Relation(
    schema,
    (
      r + tuple(s)
 
  return Relation(
    Schema([dict(type="STRING", name=filename_column)]),
    (
      (join(root,f), )
        yield row + m.groups()
 
  return Relation(schema, extract())
 
 

src/s/p/splicer-0.1.0/splicer/functions/relational.py   splicer(Download)
"""
Functions useable in the from clause
"""
 
from ..relation import Relation
  #TODO: remove the need to wrap the results in a relation
  return Relation(
    flatten_schema(schema, path), 
    (
      new_row

src/s/p/splicer-0.1.0/splicer/codecs/csv.py   splicer(Download)
 
from ..schema import Schema
from ..relation import Relation
from . import decodes
 
 
  return Relation(
    schema,
    reader
   )

src/s/p/splicer-HEAD/splicer/functions/relational.py   splicer(Download)
"""
Functions useable in the from clause
"""
 
from ..relation import Relation
  #TODO: remove the need to wrap the results in a relation
  return Relation(
    flatten_schema(schema, path), 
    (
      new_row

src/s/p/splicer-HEAD/splicer/codecs/csv.py   splicer(Download)
 
from ..schema import Schema
from ..relation import Relation
from . import decodes
 
 
  return Relation(
    schema,
    reader
   )

src/s/p/splicer-0.1.0/splicer/__init__.py   splicer(Download)
 
from .dataset import DataSet
from .relation import Relation

  1 | 2  Next