Esempio n. 1
0
 def __init__(self,nodes,E,A,L,theta,label=""):
     Element.__init__(self,etype="truss",label=label)
     self.nodes = nodes
     self.E = E
     self.A = A
     self.L = L
     self.theta = theta
Esempio n. 2
0
 def _parse_header(self):
    print('(Parser:_parse_header BEGIN)')
    element = None
    while True:
       line = self.file.readline().strip()
       print('  [header] {}'.format(line))
       if line == 'end_header':
          break
       elems = line.split()
       if elems[0] == 'format':
          self.format = elems[1]
       elif elems[0] == 'element':
          if element:
             self.elements.append(element)
          name, size = elems[1:3]
          element = Element(name, int(size))
       elif elems[0] == 'property':
          prop_type, prop_name = ' '.join(elems[1:-1]), elems[-1]
          element.add_property(Property(prop_type, prop_name))
    self.elements.append(element)
    print('(PLYParser:_parse_header END)')
 def __init__(self, index_file_path=None, segment_name = None, active_limit=3, delete_inactive_segments=True, target_duration=10):
     """
     Arguments:
     index_file_url - optional, something like /var/www/test_server/static/event_streams/asdflkj/index (leave off extension)
     files_directory - optional, defaults to the same directory as the index_file
     number_of_files - optional, defaults to 3 - if you set it to 0, it will not limit them
     delete_after_use - optional, default to True, sets the files to be deleted from the system after they
                                 are removed fromt he indexer
     """
     Element.__init__(self)
     #This section is to validate that we can create the index file, and then deletes the test file
     if index_file_path:
         self.set_index_file_path(index_file_path)
     else:
         self._index_file_path = None
     
     if segment_name:
         self.name_string = segment_name
     
     self._segment_handler = IndexerSegmentHandler(self, self.target_duration, name_string=self.name_string,  
                                            active_limit=active_limit, delete_inactive_segments=delete_inactive_segments)
     
     self.target_duration = target_duration
 def __init__(self, samples=50, finish_passes_partials=True, mode=20):
     self.finish_passes_partials = finish_passes_partials
     self.mode = mode
     self._buffer_limit = self._SAMPLE_SIZE * samples
     Element.__init__(self)
 def __init__(self, samples=10, finish_passes_partials=True):
     self.finish_passes_partials = finish_passes_partials
     self._buffer_limit = self._SAMPLE_SIZE * samples
     self.encoder = py_ffmpeg.mp3_encoder()
     Element.__init__(self)
Esempio n. 6
0
 def __init__(self,nodes,E,A,L,label=""):
     Element.__init__(self,etype="bar",label=label)
     self.nodes = nodes
     self.E = E # Elastic modulus
     self.A = A # Cross-section
     self.L = L # Length
Esempio n. 7
0
 def __init__(self,nodes,ke,label=""):
     Element.__init__(self,etype="spring",label=label)
     self.nodes = nodes
     self.ke = ke
Esempio n. 8
0
 def __init__(self,nodes,E,I,L,label=""):
     Element.__init__(self,etype="beam",label=label)
     self.nodes = nodes
     self.E = E
     self.I = I
     self.L = L