// City generates random city
429408
func City() string {
	city := lookup(lang, "cities", true)
	switch r.Intn(5) {
	case 0:
		return join(cityPrefix(), city)
	case 1:
		return join(city, citySuffix())
	default:
		return city
	}
}
88030
func (fng *FakeNumberGenerator) RandomAreaCode() uint16 {
	return fng.AreaCodes[fng.Rand.Intn(len(fng.AreaCodes))]
}
468392
func (r *Reader) City(ipAddress net.IP) (*City, error) {
	if isCity&r.databaseType == 0 {
		return nil, InvalidMethodError{"City", r.Metadata().DatabaseType}
	}
	var city City
	err := r.mmdbReader.Lookup(ipAddress, &city)
	return &city, err
}
947688
func (l *localKeyClient) Generate(keyName string, curveType crypto.CurveType) (keyAddress crypto.Address, err error) {
	resp, err := l.ks.GenerateKey(nil, &GenRequest{KeyName: keyName, CurveType: curveType.String()})
	if err != nil {
		return crypto.Address{}, err
	}
	return crypto.AddressFromHexString(resp.GetAddress())
}
97770
func GenerateRandomID() (id string, err error) {
	buf, err := generateSecureRandomData(keyIDSize)
	if err != nil {
		return "", err
	}
	if !validateDataIntegrity(buf, keyIDSize) {
		return "", fmt.Errorf("error in generateRandomID: crypto/rand failed to generate random data")
	}
	id = common.Bytes2Hex(buf)
	return id, err
}
447126
func (s *mustRunAsRange) Generate(pod *api.Pod, container *api.Container) (*int64, error) {
	return s.opts.UIDRangeMin, nil
}
1053201
func GenerateRandomUUID(length int) (string, error) {
	var letters = []rune("abcdef0123456789")

	b := make([]rune, length)
	for i := range b {
		b[i] = letters[rand.Intn(len(letters))]
	}
	return FormatUUID(string(b))
}
139274
func (r *randomGraph) Generate(n int) ([]*triple.Triple, error) {
	maxEdges := r.nodes * r.nodes
	if n > maxEdges {
		return nil, fmt.Errorf("current configuration only allow a max of %d triples (%d requested)", maxEdges, n)
	}
	var trpls []*triple.Triple
	for _, idx := range rand.Perm(maxEdges)[:n] {
		i, j := idx/r.nodes, idx%r.nodes
		t, err := r.newTriple(i, j)
		if err != nil {
			return nil, err
		}
		trpls = append(trpls, t)
	}
	return trpls, nil
}
1307790
func (m *MonotonicEntropy) random() (inc uint64, err error) {
	if m.inc <= 1 {
		return 1, nil
	}

	// Fast path for using a underlying rand.Rand directly.
	if m.rng != nil {
		// Range: [1, m.inc)
		return 1 + uint64(m.rng.Int63n(int64(m.inc))), nil
	}

	// bitLen is the maximum bit length needed to encode a value < m.inc.
	bitLen := bits.Len64(m.inc)

	// byteLen is the maximum byte length needed to encode a value < m.inc.
	byteLen := uint(bitLen+7) / 8

	// msbitLen is the number of bits in the most significant byte of m.inc-1.
	msbitLen := uint(bitLen % 8)
	if msbitLen == 0 {
		msbitLen = 8
	}

	for inc == 0 || inc >= m.inc {
		if _, err = io.ReadFull(m.Reader, m.rand[:byteLen]); err != nil {
			return 0, err
		}

		// Clear bits in the first byte to increase the probability
		// that the candidate is < m.inc.
		m.rand[0] &= uint8(int(1<<msbitLen) - 1)

		// Convert the read bytes into an uint64 with byteLen
		// Optimized unrolled loop.
		switch byteLen {
		case 1:
			inc = uint64(m.rand[0])
		case 2:
			inc = uint64(binary.LittleEndian.Uint16(m.rand[:2]))
		case 3, 4:
			inc = uint64(binary.LittleEndian.Uint32(m.rand[:4]))
		case 5, 6, 7, 8:
			inc = uint64(binary.LittleEndian.Uint64(m.rand[:8]))
		}
	}

	// Range: [1, m.inc)
	return 1 + inc, nil
}
618295
func (s *City) SetCityName(v string) *City {
	s.CityName = &v
	return s
}
205370
func generate(length int) string {
	alphanum := "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
	var bytes = make([]byte, length)
	rand.Read(bytes)
	for i, b := range bytes {
		bytes[i] = alphanum[b%byte(len(alphanum))]
	}

	return string(bytes)
}
709607
func (g *IDGenerator) Generate() string {
	var nb [8]byte
	n := atomic.AddUint64(&g.n, 1)
	binary.LittleEndian.PutUint64(nb[:], n)

	id := g.seed
	for i, b := range nb {
		id[i] ^= b
	}

	var strbuf [36]byte
	for i := 0; i < 4; i++ {
		strbuf[i*2] = hexData[int(id[i])*2]
		strbuf[i*2+1] = hexData[int(id[i])*2+1]
	}
	strbuf[8] = '-'
	for i := 4; i < 6; i++ {
		strbuf[i*2+1] = hexData[int(id[i])*2]
		strbuf[i*2+2] = hexData[int(id[i])*2+1]
	}
	strbuf[13] = '-'
	for i := 6; i < 8; i++ {
		strbuf[i*2+2] = hexData[int(id[i])*2]
		strbuf[i*2+3] = hexData[int(id[i])*2+1]
	}
	strbuf[18] = '-'
	for i := 8; i < 10; i++ {
		strbuf[i*2+3] = hexData[int(id[i])*2]
		strbuf[i*2+4] = hexData[int(id[i])*2+1]
	}
	strbuf[23] = '-'
	for i := 10; i < 16; i++ {
		strbuf[i*2+4] = hexData[int(id[i])*2]
		strbuf[i*2+5] = hexData[int(id[i])*2+1]
	}
	return string(strbuf[:])
}
92915
func (a *APIDefinition) RandomGenerator() *RandomGenerator {
	if a.rand == nil {
		a.rand = NewRandomGenerator(a.Name)
	}
	return a.rand
}
506743
func (s *Shuffler) Shuffle(data Interface) {
	n := data.Len()
	for i := n - 1; i >= 0; i-- {
		j := (*rand.Rand)(s).Intn(i + 1)
		data.Swap(i, j)
	}
}
328807
func (cl *CommandList) Random(random bool) {
	if random {
		cl.cmdQ.PushBack(&command{"random 1", nil, cmdNoReturn})
	} else {
		cl.cmdQ.PushBack(&command{"random 0", nil, cmdNoReturn})
	}
}
610244
func (h Hash) Generate(rand *rand.Rand, size int) reflect.Value {
	m := rand.Intn(len(h))
	for i := len(h) - 1; i > m; i-- {
		h[i] = byte(rand.Uint32())
	}
	return reflect.ValueOf(h)
}
651943
func (window *Window) GetWindowOpacity() (opacity float32, err error) {
	return opacity, errorFromInt(int(
		C.SDL_GetWindowOpacity(window.cptr(), (*C.float)(unsafe.Pointer(&opacity)))))
}