Serialize a list of Transforms
9455
public String serializeTransformList(List<Transform> list) {
        ObjectMapper om = getObjectMapper();
        try {
            return om.writeValueAsString(new ListWrappers.TransformList(list));
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
430404
def serialize(self, resources):
        """"""
        serialized = {
            'meta': {
                'sqlalchemy_jsonapi_version': '4.0.9'
            },
            'jsonapi': {
                'version': '1.0'
            }
        }
        # Determine multiple resources by checking for SQLAlchemy query count.
        if hasattr(resources, 'count'):
            serialized['data'] = []
            for resource in resources:
                serialized['data'].append(
                    self._render_resource(resource))
        else:
            serialized['data'] = self._render_resource(resources)

        return serialized
305851
def transform(self, dstreams, transformFunc):
        
        jdstreams = [d._jdstream for d in dstreams]
        # change the final serializer to sc.serializer
        func = TransformFunction(self._sc,
                                 lambda t, *rdds: transformFunc(rdds),
                                 *[d._jrdd_deserializer for d in dstreams])
        jfunc = self._jvm.TransformFunction(func)
        jdstream = self._jssc.transform(jdstreams, jfunc)
        return DStream(jdstream, self, self._sc.serializer)
554180
def _serialize_hcons(hcons):
    """"""
    toks = ['HCONS:', '<']
    for hc in hcons:
        toks.extend(hc)
        # reln = hcon[1]
        # toks += [hcon[0], rel, str(hcon.lo)]
    toks += ['>']
    return ' '.join(toks)
1064169
def serialize(v, known_modules=[]):
    ''''''
    tname = name(v, known_modules=known_modules)
    func = serializer(tname)
    return func(v), tname
166381
function serializeHeaders(mHeaders) {
		var sHeaderName,
			aHeaders = [];

		for (sHeaderName in mHeaders) {
			aHeaders = aHeaders.concat(sHeaderName, ":", mHeaders[sHeaderName], "\r\n");
		}

		return aHeaders;
	}
296798
function transformAllFiles(transform, flush) {
  var files = [];

  return through.obj(
    function(file, enc, cb) {
      if (file.isStream()) {
        this.emit('error', new gutil.PluginError(PLUGIN_NAME, 'Streams are not supported!'));
        return cb();
      }

      if (file.isBuffer()) {
        if (transform) transform.call(this, file, enc);
      }

      files.push(file);
      cb();
    },
    function(cb) {
      if (flush) files = flush.call(this, files);
      for (var i = 0; i < files.length; ++i) {
        this.push(files[i]);
      }
      cb();
    }
  );
}
934000
def _byteify(data):
    """"""

    # Unicode
    if isinstance(data, six.text_type):
        return data.encode("utf-8")

    # Members of lists
    if isinstance(data, list):
        return [_byteify(item) for item in data]

    # Members of dicts
    if isinstance(data, dict):
        return {
            _byteify(key): _byteify(value) for key, value in data.items()
        }

    # Anything else, return the original form
    return data
1003495
private void _serializeArray(Array array, StringBuilder sb, Set<Object> done) throws ConverterException {
	_serializeList(array.toList(), sb, done);
    }
863437
def _multi_string_put_transform(cls, item, **kwargs):
        '''
        
        '''
        if isinstance(item, list):
            return item
        elif isinstance(item, six.string_types):
            if item.lower() == 'not defined':
                return None
            else:
                return item.split(',')
        else:
            return 'Invalid Value'
1129352
def transform(func, data):
    
    out = []
    for r in data:
        out.append(func(r))
    return out
966349
def _serialize_inputs(inputs):
        """"""
        serialized_inputs = {}
        for input_id, input_value in inputs.items():
            if isinstance(input_value, list):
                serialized_list = Task._serialize_input_list(input_value)
                serialized_inputs[input_id] = serialized_list
            else:
                if isinstance(input_value, File):
                    input_value = Task._to_api_file_format(input_value)
                serialized_inputs[input_id] = input_value
        return serialized_inputs
352997
private Collection<Integer> transform(StreamTransformation<?> transform) {

		if (alreadyTransformed.containsKey(transform)) {
			return alreadyTransformed.get(transform);
		}

		LOG.debug("Transforming " + transform);

		if (transform.getMaxParallelism() <= 0) {

			// if the max parallelism hasn't been set, then first use the job wide max parallelism
			// from the ExecutionConfig.
			int globalMaxParallelismFromConfig = env.getConfig().getMaxParallelism();
			if (globalMaxParallelismFromConfig > 0) {
				transform.setMaxParallelism(globalMaxParallelismFromConfig);
			}
		}

		// call at least once to trigger exceptions about MissingTypeInfo
		transform.getOutputType();

		Collection<Integer> transformedIds;
		if (transform instanceof OneInputTransformation<?, ?>) {
			transformedIds = transformOneInputTransform((OneInputTransformation<?, ?>) transform);
		} else if (transform instanceof TwoInputTransformation<?, ?, ?>) {
			transformedIds = transformTwoInputTransform((TwoInputTransformation<?, ?, ?>) transform);
		} else if (transform instanceof SourceTransformation<?>) {
			transformedIds = transformSource((SourceTransformation<?>) transform);
		} else if (transform instanceof SinkTransformation<?>) {
			transformedIds = transformSink((SinkTransformation<?>) transform);
		} else if (transform instanceof UnionTransformation<?>) {
			transformedIds = transformUnion((UnionTransformation<?>) transform);
		} else if (transform instanceof SplitTransformation<?>) {
			transformedIds = transformSplit((SplitTransformation<?>) transform);
		} else if (transform instanceof SelectTransformation<?>) {
			transformedIds = transformSelect((SelectTransformation<?>) transform);
		} else if (transform instanceof FeedbackTransformation<?>) {
			transformedIds = transformFeedback((FeedbackTransformation<?>) transform);
		} else if (transform instanceof CoFeedbackTransformation<?>) {
			transformedIds = transformCoFeedback((CoFeedbackTransformation<?>) transform);
		} else if (transform instanceof PartitionTransformation<?>) {
			transformedIds = transformPartition((PartitionTransformation<?>) transform);
		} else if (transform instanceof SideOutputTransformation<?>) {
			transformedIds = transformSideOutput((SideOutputTransformation<?>) transform);
		} else {
			throw new IllegalStateException("Unknown transformation: " + transform);
		}

		// need this check because the iterate transformation adds itself before
		// transforming the feedback edges
		if (!alreadyTransformed.containsKey(transform)) {
			alreadyTransformed.put(transform, transformedIds);
		}

		if (transform.getBufferTimeout() >= 0) {
			streamGraph.setBufferTimeout(transform.getId(), transform.getBufferTimeout());
		}
		if (transform.getUid() != null) {
			streamGraph.setTransformationUID(transform.getId(), transform.getUid());
		}
		if (transform.getUserProvidedNodeHash() != null) {
			streamGraph.setTransformationUserHash(transform.getId(), transform.getUserProvidedNodeHash());
		}

		if (!streamGraph.getExecutionConfig().hasAutoGeneratedUIDsEnabled()) {
			if (transform.getUserProvidedNodeHash() == null && transform.getUid() == null) {
				throw new IllegalStateException("Auto generated UIDs have been disabled " +
					"but no UID or hash has been assigned to operator " + transform.getName());
			}
		}

		if (transform.getMinResources() != null && transform.getPreferredResources() != null) {
			streamGraph.setResources(transform.getId(), transform.getMinResources(), transform.getPreferredResources());
		}

		return transformedIds;
	}
893173
function (transformFnc) {
            var ret = [];
            transformFnc = transformFnc || function (item, index) {
                return item;
            };


            this.each(function (item, index) {
                ret.push(transformFnc(item, index));
            });

            return ret;
        }
991743
def serialize_all(obj):
        """"""
        if '_hyperparameters' not in dir(obj):
            return {}
        return {k: str(v) for k, v in obj._hyperparameters.items() if v is not None}
1080880
def serialize(self):
        """"""
        res = []
        for _sort in self.sort_orders:
            res.append(_sort.serialize())
        return res or None
779896
def transforms(self):
        

        tr = []
        for c in self.columns:
            tr.append(c.expanded_transform)

        return six.moves.zip_longest(*tr)