Convenience method to serialise the tournament into a supported format.
 Throws an exception unless the name of a supported format is supplied
 or if the tournament is unsuitable for serialisation in that format.
337829
def serialize(format, arg={})
      serializer = case format.to_s.downcase
        when 'krause'     then ICU::Tournament::Krause.new
        when 'foreigncsv' then ICU::Tournament::ForeignCSV.new
        when 'spexport'   then ICU::Tournament::SPExport.new
        when ''           then raise "no format supplied"
        else raise "unsupported serialisation format: '#{format}'"
      end
      serializer.serialize(self, arg)
    end
788442
def serialize(self, elt, sw, pyobj, name=None, orig=None, **kw):
        '''
        

        '''
        raise EvaluateException("Unimplemented evaluation", sw.Backtrace(elt))
349611
def serialize(self, format):
        
        if PY3:
            return self.prov_g.serialize(format=format).decode('utf-8')
        else:
            return self.prov_g.serialize(format=format)
1248993
def Serialize(self, writer):
        
        super(AssetState, self).Serialize(writer)
        writer.WriteUInt256(self.AssetId)
        writer.WriteByte(self.AssetType)
        writer.WriteVarString(self.Name)

        if self.Amount.value > -1:
            writer.WriteFixed8(self.Amount, unsigned=True)
        else:
            writer.WriteFixed8(self.Amount)

        if type(self.Available) is not Fixed8:
            raise Exception("AVAILABLE IS NOT FIXED 8!")
        writer.WriteFixed8(self.Available, unsigned=True)
        writer.WriteByte(self.Precision)
        writer.WriteByte(b'\x00')
        writer.WriteFixed8(self.Fee)
        writer.WriteUInt160(self.FeeAddress)
        self.Owner.Serialize(writer)
        writer.WriteUInt160(self.Admin)
        writer.WriteUInt160(self.Issuer)
        writer.WriteUInt32(self.Expiration)
        writer.WriteBool(self.IsFrozen)
968311
def create(name, url, tournament_type="single elimination", **params):
    """"""
    params.update({
        "name": name,
        "url": url,
        "tournament_type": tournament_type,
    })

    return api.fetch_and_parse("POST", "tournaments", "tournament", **params)
123926
public static boolean isHiveTableAvroType(Table targetTable) throws IOException {
    String serializationLib = targetTable.getTTable().getSd().getSerdeInfo().getSerializationLib();
    String inputFormat = targetTable.getTTable().getSd().getInputFormat();
    String outputFormat = targetTable.getTTable().getSd().getOutputFormat();

    return inputFormat.endsWith("AvroContainerInputFormat") || outputFormat.endsWith("AvroContainerOutputFormat")
        || serializationLib.endsWith("AvroSerDe");
  }
428217
public void serialize(final DataOutput pOutput) throws TTIOException {
        try {
            pOutput.writeInt(getNameKey());
            pOutput.writeInt(getURIKey());
        } catch (final IOException exc) {
            throw new TTIOException(exc);
        }
    }
860922
def serialize(self):
        
        data = {}

        for field_name in self.get_statement_field_names():
            format_method = getattr(self, 'get_{}'.format(
                field_name
            ), None)

            if format_method:
                data[field_name] = format_method()
            else:
                data[field_name] = getattr(self, field_name)

        return data
1127696
private void _serializeSerializable(Serializable serializable, StringBuilder sb) throws ConverterException {

	sb.append(goIn());
	sb.append("evaluateJava(").append(QUOTE_CHR);
	try {
	    sb.append(JavaConverter.serialize(serializable));
	}
	catch (IOException e) {
	    throw toConverterException(e);
	}
	sb.append(QUOTE_CHR).append(')');
    }
488784
def serializeable_exc_info(thetype, ex, tb):
    
    return thetype, ex, ''.join(traceback.format_exception(thetype, ex, tb))
299471
public static String formatException(Throwable exception) {
		StringBuilder buffer = new StringBuilder();

		formatException(exception, buffer);

		return buffer.toString();
	}
419074
def serialize(self, raw=False):
        '''
        '''
        if raw:
            return self._key.encode()
        return self._key.encode(nacl.encoding.Base64Encoder)
643954
def serialize(self, data):
        
        if data is None:
            return None
        elif isinstance(data, dict):
            return serializer.Serializer().serialize(data)
        else:
            raise Exception(_("Unable to serialize object of type = '%s'") %
                            type(data))
1118447
public function serialize()
    {
        if (!$this->_useBuffering) {
            $msg = 'You cannot serialize an un-buffered ResultSet. Use Query::bufferResults() to get a buffered ResultSet.';
            throw new Exception($msg);
        }

        while ($this->valid()) {
            $this->next();
        }

        if ($this->_results instanceof SplFixedArray) {
            return serialize($this->_results->toArray());
        }

        return serialize($this->_results);
    }
556414
def create(tournament, name, **params):
    """"""
    params.update({"name": name})

    return api.fetch_and_parse(
        "POST",
        "tournaments/%s/participants" % tournament,
        "participant",
        **params)
1356334
def validate_export_format(format)
        unless MakeExportable.exportable_formats.keys.include?(format.to_sym)
          raise MakeExportable::FormatNotFound.new("#{format} is not a supported format.")
        end
        unless exportable_options[:formats].include?(format.to_sym)
          raise MakeExportable::FormatNotFound.new("#{format} format is not allowed on this class.")
        end
      end
573135
def serialize(self):
        
        pickle = super(ResourceParameter, self).serialize()
        pickle['frequency'] = self.frequency
        pickle['unit'] = self._unit.serialize()
        return pickle