Gang Of Coders
Home
About Us
Contact Us
All Random Solutions on Gang of Coders
Total of 319 Random Solutions
Generating random dates within a given range in pandas
Python
Pandas
Datetime
Random
How to create a random string using PHP?
Php
String
Random
Why do people say there is modulo bias when using a random number generator?
C++
Random
Language Agnostic
Modulo
JavaScript Random Positive or Negative Number
Javascript
Random
Laravel str_random() or custom function?
String
Function
Random
Laravel
Uuid
Generate 'n' unique random numbers within a range
Python
Random
Unique
Could a truly random number be generated using pings to pseudo-randomly selected IP addresses?
Algorithm
Theory
Random
Python: why does `random.randint(a, b)` return a range inclusive of `b`?
Python
Random
Integer
Boundary
Better way to shuffle two numpy arrays in unison
Python
Numpy
Random
Shuffle
Numpy Ndarray
Generating unique random numbers (integers) between 0 and 'x'
Javascript
Random
Generating Discrete random variables with specified weights using SciPy or NumPy
Python
Random
Numpy
Scipy
How to randomize Excel rows
Excel
Random
safe enough 8-character short unique random string
Python
Hash
Random
Cryptography
What is a good random number generator for a game?
C++
Performance
Random
Need a fast random generator for c++
C++
Random
Performance
Random element of List<T> from LINQ SQL
C#
.Net
Linq
Random
How to generate random color names in C#
C#
Random
Colors
Why does rand() + rand() produce negative numbers?
C
Random
How Random is System.Guid.NewGuid()?
.Net
Random
Guid
Random float number generation
C++
Random
Floating Point
Insert/ Update random date in MySQL
Mysql
Sql
Date
Random
Python ImportError cannot import urandom Since Ubuntu 12.04 upgrade
Python
Ubuntu
Random
Java random numbers using a seed
Java
Random
Seed
Windows equivalent of /dev/random
Windows
Random
Best way to choose a random file from a directory
Python
File
Random
Best way to choose a random file from a directory in a shell script
Bash
File
Shell
Random
Get a random item from a JavaScript array
Javascript
Arrays
Random
Generate Random Numbers Between Two Numbers in Objective-C
Objective C
Random
Arc4random
What's the best way to generate random strings of a specific length in Python?
Python
Random
Random over ThreadLocalRandom
Java
Multithreading
Random
Coding pattern for random percentage branching?
Java
Design Patterns
Random
Weighted random selection with and without replacement
Python
Algorithm
Random
Random Sample
Most efficient way to randomly "sort" (Shuffle) a list of integers in C#
C#
Random
Shuffle
Java random number with given length
Java
Random
random byte string in python
Python
String
Random
Hex
List.shuffle() in Dart?
List
Sorting
Random
Set
Dart
scikit-learn random state in splitting dataset
Python
Random
Machine Learning
Scikit Learn
Java normal distribution
Java
Random
Normal Distribution
Initializing ThreadStatic field still causes NullReferenceException
C#
Random
Thread Safety
Threadstatic
How Random is System.Guid.NewGuid()? (Take two)
.Net
Random
Guid
Getting N random numbers whose sum is M
Random
Language Agnostic
Sum
Why does rand() yield the same sequence of numbers on every run?
C++
Random
Pick N distinct items at random from sequence of unknown length, in only one iteration
Python
Algorithm
Random
How to decide between two numbers randomly using javascript?
Javascript
Random
MySQL UPDATE with random number between 1-3
Mysql
Random
Numbers
Between
How can I generate a random number within a range in Rust?
Random
Rust
Rust Obsolete
What's the difference between arc4random and arc4random_uniform?
Objective C
Random
Arc4random
How can I generate random alphanumeric strings?
C#
.Net
Random
How can I generate random number in specific range in Android?
Java
Android
Kotlin
Random
Generating Random Passwords
C#
Passwords
Random
Random shuffling of an array
Java
Arrays
Random
Shuffle
Generate a random point within a circle (uniformly)
Math
Random
Geometry
Probability
How to access random item in list?
C#
Arrays
String
Random
How to randomly select rows in SQL?
Sql
Database
Random
What's an easy way to read random line from a file?
Shell
Random
Random alpha-numeric string in JavaScript?
Javascript
Random
How do I generate random numbers in Dart?
Random
Dart
Getting a random value from a JavaScript array
Javascript
Random
How can I get a random number in Kotlin?
Random
Kotlin
Jvm
Get a random number focused on center
Javascript
Algorithm
Random
Numbers
Get random item from array
Php
Random
Random row selection in Pandas dataframe
Python
Pandas
Random
Random String Generator Returning Same String
C#
Random
How to generate a random number in C++?
C++
Random
PHP random string generator
Php
String
Random
Generating a random password in php
Php
Security
Random
Passwords
Difference between java.util.Random and java.security.SecureRandom
Java
Random
Cryptography
Security
JS generate random boolean
Javascript
Random
Boolean
Random / noise functions for GLSL
Random
Shader
Glsl
Noise
Perlin Noise
How to properly seed random number generator
Random
Go
Generating a Random Number between 1 and 10 Java
Java
Random
Random number between 0 and 1 in python
Python
Random
How do I create a random alpha-numeric string in C++?
C++
String
Random
Is java.util.Random really that random? How can I generate 52! (factorial) possible sequences?
Java
Permutation
Random Seed
Random
Picking a random element from a set
Java
Algorithm
Language Agnostic
Random
Set
How do I select a random value from an enumeration?
C#
Random
Enums
Generate random numbers with a given (numerical) distribution
Python
Module
Random
Pick a random value from an enum?
Java
Random
Enums
How to generate a random number between a and b in Ruby?
Ruby
Random
Range
Reasons for using the set.seed function
R
Random
Pick a random element from an array
Arrays
Swift
Random
random.seed(): What does it do?
Python
Random
Random Seed
How do I generate random integers within a specific range in Java?
Java
Random
Integer
Shuffling a list of objects
Python
List
Random
Shuffle
Efficient method to generate UUID String in Java (UUID.randomUUID().toString() without the dashes)
Java
Random
Uuid
Java Generate Random Number Between Two Given Values
Java
Random
Numbers
How to get a random value from dictionary?
Python
Random
Dictionary
Key
Understanding "randomness"
Math
Language Agnostic
Random
Select N random elements from a List<T> in C#
C#
Algorithm
Collections
Random
Element
Random state (Pseudo-random number) in Scikit learn
Python
Random
Scikit Learn
Unique (non-repeating) random numbers in O(1)?
Algorithm
Math
Random
Language Agnostic
Generate a random date between two other dates
Python
Datetime
Random
How can I select random files from a directory in bash?
Bash
Random
Random number generator only generating one random number
C#
Random
How to get a random number in Ruby
Ruby on-Rails
Ruby
Ruby on-Rails-3
Ruby on-Rails-4
Random
How to deal with a slow SecureRandom generator?
Java
Performance
Security
Random
Entropy
Random Number Between 2 Double Numbers
C#
Random
How can I generate a unique ID in Python?
Python
Random
Unique Id
Generate a random letter in Python
Python
Random
Python 3.x
How to generate a random string in Ruby
Ruby
Random
Passwords
Generating random integer from a range
C++
Random
Seedable JavaScript random number generator
Javascript
Random
Seed
Best way to randomize an array with .NET
C#
.Net
Algorithm
Sorting
Random
Select 50 items from list at random
Python
List
Select
Random
Is this a "good enough" random algorithm; why isn't it used if it's faster?
Java
Performance
Algorithm
Random
Random record in ActiveRecord
Ruby on-Rails
Random
Rails Activerecord
Generating random numbers in Objective-C
Objective C
Random
Why do I get this particular color pattern when using rand()?
C
Image
Random
How many random elements before MD5 produces collisions?
Random
Md5
Hash
How do I pick 2 random items from a Python set?
Python
Random
Is 161803398 A 'Special' Number? Inside of Math.Random()
C#
.Net
Algorithm
Random
Generate random numbers using C++11 random library
C++
C++11
Random
Range
Generate a random double in a range
Java
Random
Best way to create unique token in Rails?
Ruby on-Rails
Ruby on-Rails-3
Random
Guid
How do I create a list of random numbers without duplicates?
Python
Random
Expand a random range from 1–5 to 1–7
Algorithm
Random
Puzzle
Random date in C#
C#
Datetime
Random
Date
Java: random long number in 0 <= x < n range
Java
Random
Range
Long Integer
Need for predictable random generator
C++
Algorithm
Random
Generate a random alphanumeric string in Cocoa
Objective C
Cocoa
String
Random
Alphanumeric
How to hash a string into 8 digits?
Python
Arrays
Algorithm
Random
Hash
How to create an array of 20 random bytes?
Java
Arrays
Random
How to generate random SHA1 hash to use as ID in node.js?
Javascript
node.js
Random
Sha1
Entropy
How to get random value out of an array?
Php
Arrays
Random
Select random row from a sqlite table
Sqlite
Random
Row
Why does C++ rand() seem to generate only numbers of the same order of magnitude?
C++
C
Math
Random
Math.random() versus Random.nextInt(int)
Java
Random
Data structures for loaded dice?
Algorithm
Language Agnostic
Data Structures
Random
Probability
How to generate a random int in C?
C
Random
Create an array with random values
Javascript
Arrays
Random
How do I seed a random class to avoid getting duplicate random values
C#
Random
Why does this random value have a 25/75 distribution instead of 50/50?
Java
Random
Double
Bit Manipulation
Probability
How to generate a random number with a specific amount of digits?
Python
Random
Generate random array of floats between a range
Python
Arrays
Random
Numpy
How to randomly sort (scramble) an array in Ruby?
Ruby
Arrays
Random
Shuffle
Generate unique random numbers between 1 and 100
Javascript
Random
Integer
Numbers
Rails 3: Get Random Record
Ruby on-Rails
Ruby
Ruby on-Rails-3
Activerecord
Random
How do I pick randomly from an array?
Ruby
Arrays
Random
Best way to generate random file names in Python
Python
Random
Hash
Is it correct to use JavaScript Array.sort() method for shuffling?
Javascript
Random
Sorting
Shuffle
Generate random password string with requirements in javascript
Javascript
Random
Why does random.shuffle return None?
Python
List
Random
Shuffle
How random is JavaScript's Math.random?
Javascript
Random
How to get a random number between a float range?
Python
Random
Floating Point
Generate GUID in MySQL for existing Data?
Mysql
Random
Guid
How to succinctly, portably, and thoroughly seed the mt19937 PRNG?
C++
C++11
Random
Is Random class thread safe?
Java
Multithreading
Random
Thread Safety
Is 1.0 a valid output from std::generate_canonical?
C++
C++11
Random
Why does rand() repeat numbers far more often on Linux than Mac?
C
Linux
Macos
Random
Generate random numbers following a normal distribution in C/C++
C++
C
Random
Distribution
Normal Distribution
Simple Random Samples from a Sql database
Mysql
Sql
Postgresql
Random
Generate random string/characters in JavaScript
Javascript
String
Random
Generating random whole numbers in JavaScript in a specific range
Javascript
Random
Integer
Generate random number between two numbers in JavaScript
Javascript
Random
How do I generate a random int number?
C#
Random
Simple way to create matrix of random numbers
Python
Random
Coding Style
How to generate a random integer number from within a range
C
Random
Non-repetitive random number in numpy
Random
Numpy
Numbers
Non Repetitive
How to request a random row in SQL?
Sql
Random
Generate a random number in the range 1 - 10
Sql
Postgresql
Random
How do you create a random string that's suitable for a session ID in PostgreSQL?
Postgresql
Random
Retrieving a random item from ArrayList
Java
Arraylist
Random
Differences between numpy.random and random.random in Python
Python
Random
Random Seed
Weighted random numbers
C++
Boost
Random
How to generate random strings in Python?
Python
String
Random
How to use random in BATCH script?
Windows
Random
Windows Xp
Batch File
What's with 181783497276652981 and 8682522807148012 in Random (Java 7)?
Java
Random
How to Generate a random number of fixed length using JavaScript?
Javascript
Random
Numbers
Generating random strings with T-SQL
Sql
Tsql
Random
Random number generation in C++11: how to generate, how does it work?
C++
C++11
Random
Generating a list of random numbers, summing to 1
Python
Random
Why is rand()%6 biased?
C++
Random
Std
How can I randomize the lines in a file using standard tools on Red Hat Linux?
Linux
File
Random
Redhat
Shuffle
How do I select a random element from an array in Python?
Python
Arrays
Random
What is the most pythonic way to pop a random element from a list?
Python
List
Random
Random color generator
Javascript
Random
Colors
Getting random numbers in Java
Java
Random
MySQL select 10 random rows from 600K rows fast
Mysql
Sql
Random
quick random row selection in Postgres
Postgresql
Random
How to randomize (or permute) a dataframe rowwise and columnwise?
R
Random
Permutation
Generate random numbers uniformly over an entire range
C++
Random
Pick random property from a Javascript object
Javascript
Random
Unique random string generation
C#
Random
Generate random 5 characters string
Php
Random
Efficiently generate a 16-character, alphanumeric string
Python
Hash
Random
Difference between np.random.seed() and np.random.RandomState()
Python
Numpy
Random
How to make a random color with Swift
Swift
Random
Colors
Uicolor
Func
Generating Unique Random Numbers in Java
Java
Random
How can I randomly select an item from a list?
Python
List
Random
How does one generate a random number in Swift?
Swift
Random
Seeding the random number generator in Javascript
Javascript
Random
Random Seed
Seeding
How many double numbers are there between 0.0 and 1.0?
Random
Floating Point
Double
Precision
Elegant method to generate array of random dates within two dates
Javascript
Date
Random
Jquery Ui-Datepicker
set random seed programwide in python
Python
Random
Seed
Consistently create same random numpy array
Python
Random
Numpy
best practice to generate random token for forgot password
Php
Security
Random
Timestamp
Token
Creating random numbers with no duplicates
Java
Random
Fastest way to generate a random boolean
C#
Performance
Random
Boolean
Collisions when generating UUIDs in JavaScript
Javascript
Random
Uuid
Collision
How to get records randomly from the oracle database?
Oracle
Select
Random
Is C# Random Number Generator thread safe?
C#
Random
Numbers
How to randomize a vector
R
Vector
Random
Shuffle
Read a small random sample from a big CSV file into a Python data frame
Python
Pandas
Random
Io
Import From-Csv
Getting random row through SQLAlchemy
Python
Sql
Database
Random
Sqlalchemy
Random record from a database table (T-SQL)
Sql Server
Tsql
Random
generate random double numbers in c++
C++
Random
Random number c++ in some range
C++
Random
Random number in range [min - max] using PHP
Php
Security
Random
How to generate a random, unique, alphanumeric string?
Php
String
Random
Uniqueidentifier
Generate distinctly different RGB colors in graphs
C#
Random
Graph
Colors
How can i optimize MySQL's ORDER BY RAND() function?
Mysql
Random
Performance
Postgres FOR LOOP
Postgresql
Stored Procedures
For Loop
Random
Plpgsql
Why use the C# class System.Random at all instead of System.Security.Cryptography.RandomNumberGenerator?
C#
.Net
Cryptography
Random
High quality, simple random password generator
Python
Security
Random
Passwords
Get random sample from list while maintaining ordering of items?
Python
List
Random
Sortedlist
srand() — why call it only once?
C
Random
Srand
Pandas: create new column in df with random integers from range
Python
Pandas
Random
Integer
Range
Generating (pseudo)random alpha-numeric strings
Php
Random
How to generate a random alpha-numeric string
Java
String
Random
Alphanumeric
Why does this code using random strings print "hello world"?
Java
String
Random
How can I retrieve the current seed of NumPy's random number generator?
Python
Numpy
Random
Random Seed
Mersenne Twister
How to generate a random number in Elixir?
Random
Integer
Elixir
How to use /dev/random or urandom in C?
C
Linux
Random
Generate a random filename in unix shell
Unix
Shell
Random
Tcsh
Take n random elements from a List<E>?
Java
Algorithm
Random
Sampling
Generate a random float between 0 and 1
Ios
C
Random
Floating Point
Arc4random
Swift random float between 0 and 1
Swift
Random
Arc4random
Cgfloat
Why is the new random library better than std::rand()?
C++
C++11
Random
Best way to select random rows PostgreSQL
Sql
Performance
Postgresql
Random
How do you pick "x" number of unique numbers from a list in Python?
Python
List
Random
How can I create a random number that is cryptographically secure in python?
Python
Random
Cryptography
Best way to randomize a list of strings in Python
Python
String
Random
Binary random array with a specific proportion of ones?
Python
Arrays
Random
Numpy
Random Sample
How can I generate a random number in a certain range?
Android
Random
Numbers
Range
Generator
JavaScript Math.random Normal distribution (Gaussian bell curve)?
Javascript
Algorithm
Random
Distribution
Gaussian
php random x digit number
Php
Random
Numbers
Random is barely random at all?
Python
Random
Birthday Paradox
Sample random rows in dataframe
R
Dataframe
Random
R Faq
Get random boolean in Java
Java
Random
Boolean
Creating a random string with A-Z and 0-9 in Java
Java
Random
Get random boolean true/false in PHP
Php
Random
Boolean
JavaScript expression to generate a 5-digit number in every case
Javascript
Random
Expression
Digit
Random record from MongoDB
Mongodb
Random
Mongodb Query
Weighted random selection from array
Arrays
Algorithm
Random
C# Random.Next - never returns the upper bound?
C#
Random
Random strings in Python 2.6 (Is this OK?)
Python
Random
Python 2.6
Generate random integers between 0 and 9
Python
Random
Integer
How to randomize (shuffle) a JavaScript array?
Javascript
Arrays
Random
Shuffle
Random string generation with upper case letters and digits
Python
String
Random
How to generate random number in Bash?
Bash
Shell
Random
How to generate a random string of a fixed length in Go?
String
Random
Go
Is there functionality to generate a random character in Java?
Java
Random
Random weighted selection in Java
Java
Random
Double
rand() between 0 and 1
C++
Random
Select k random elements from a list whose elements have weights
Algorithm
Math
Random
Statistics
Probability
How to select a random item from an array in shell
Arrays
Shell
Random
How to get a random string of 32 hexadecimal digits through command line?
Bash
Random
Recommended way to initialize srand?
C++
Random
Srand
Pros and cons of RNGCryptoServiceProvider
C#
.Net
Random
Random.Next returns always the same values
C#
Math
Random
Did I understand /dev/urandom?
Linux
Unix
Random
Cryptography
What distribution do you get from this broken random shuffle?
Algorithm
Language Agnostic
Math
Random
Shuffle
How to pick an item by its probability?
Java
List
Random
Probability
Generating random results by weight in PHP?
Php
Random
How to generate a random String in Java
Java
String
Random
Char
Create random list of integers in Python
Python
List
Random
Performance
How do I generate a random 10 digit number in ruby?
Ruby
Random
How does a cryptographically secure random number generator work?
Encryption
Random
Cryptography
Why do I get the same sequence for every run with std::random_device with mingw gcc4.8.1?
C++
C++11
Random
Stl
Randomness of Python's random
Python
Random
best way to pick a random subset from a collection?
Java
Algorithm
Collections
Random
Subset
PGP: Not enough random bytes available. Please do some other work to give the OS a chance to collect more entropy
Linux
Random
Gnupg
Entropy
android.content.res.Resources$NotFoundException: String resource ID Fatal Exception in Main
Android
Exception
Random
Textview
Removing value from array on specific location
Javascript
Arrays
Random
Generating a Random Decimal in C#
C#
.Net
Random
Decimal
How to generate a random BigInteger value in Java?
Java
Random
Biginteger
What is the most secure seed for random number generation?
Security
Cryptography
Random
Generate random date of birth
Java
Random
Creating random colour in Java?
Java
Colors
Random
How to generate a random UUID which is reproducible (with a seed) in Python
Python
Random
Uuid
Return True or False Randomly
Java
Random
Boolean
Pick a random value from a Go Slice
Random
Go
Slice
How do you generate a random double uniformly distributed between 0 and 1 from C++?
C++
Random
differences between random and urandom
Random
Prng
Randint doesn't always follow uniform distribution
Python
Random
How do I get a specific range of numbers from rand()?
C
Random
Random number in long range, is this the way?
C# 4.0
Random
Random integer in VB.NET
vb.net
Random
Random weighted choice
C#
Algorithm
Random
Pseudorandom Number Generator - Exponential Distribution
Algorithm
Language Agnostic
Random
Exponential Distribution
Why do I always get the same sequence of random numbers with rand()?
C
Random
Select n random rows from SQL Server table
Sql
Sql Server
Random
Random number with Probabilities
Java
Random
Probability
Should I use `random.seed` or `numpy.random.seed` to control random number generation in `scikit-learn`?
Python
Numpy
Random
Scikit Learn
Random Seed
Generating random numbers with normal distribution in Excel
Excel
Random
Normal Distribution
Random float number between 0 and 1.0 php
Php
Random
Floating Point
Integer
Python: Random numbers into a list
Python
List
Random
In python, what is the difference between random.uniform() and random.random()?
Python
Random
Uniform
Sample each group after pandas groupby
Python
Pandas
Random
Group By
Pandas Groupby
Get a random sample with replacement
Python
Python 3.x
Random
linq: order by random
C#
Linq
Random
Percentage chance of saying something?
Javascript
Random
Laravel - Eloquent or Fluent random row
Php
Laravel
Random
Eloquent
Fluent
MySQL: Alternatives to ORDER BY RAND()
Sql
Mysql
Random
Sql Order-By
Get a random boolean in python?
Python
Random
Is SecureRandom.ints() secure?
Java
Security
Random
How to get mysql random integer range?
Mysql
Random
how to query seed used by random.random()?
Python
Random
Seed
Shuffle an array with python, randomize array item order with python
Python
Arrays
Random
Shuffle
Produce a random number in a range using C#
C#
.Net
Random
Python: Random selection per group
Python
Random
Pandas
How can I shuffle the lines of a text file on the Unix command line or in a shell script?
Shell
Random
Command Line
Awk
Shuffle
Fast way to generate pseudo-random bits with a given probability of 0 or 1 for each bit
C++
C
Algorithm
Random
Bit Manipulation
java.util.UUID.randomUUID().toString() length
Java
String
Random
Uuid
String Length
Best way to generate a random float in C#
C#
Random
Floating Point
How can I generate a 6 digit unique number?
Php
Random
Is Math.random() cryptographically secure?
Javascript
Random
Cryptography
Select random lines from a file
Bash
Shell
Random
Text Processing
Random Engine Differences
C++
Random
C++11