Showing posts tagged programming.
x

Intricate Tendencies

Ask me anything   Archive   me   puppies   

23. Chinese. Libra.
Reblog ALL pug posts!

nerdy post…

Work hasn’t been too challenging lately, so it’s good that I’m taking some online classes to spice things up. I forgot a lot about python already so it’s nice to be reminded of its vast usage. The unit deals w/ dealing poker hands so that’s always fun (yay math; yes stop reading if you don’t like it lol) And of course as with many things in life one would have to do with the random function, and this was stumbled upon…

random.shuffle(x[random])

Shuffle the sequence x in place. The optional argument random is a 0-argument function returning a random float in [0.0, 1.0); by default, this is the function random().

Note that for even rather small len(x), the total number of permutations of x is larger than the period of most random number generators; this implies that most permutations of a long sequence can never be generated.

which is very interesting.

This basically says that for a long ass list (http://xkcd.com/37), the space of possible permutations is much larger than what the RNG (random number generator) is capable of producing. Hence, some permutations will never appear! Is this then truly random (every permutation having an equal chance of appearing)?

More about shuffling: Everytime you shuffle a deck, it is likely that it’s never been generated before. Ever. It’s like a new born baby.

— 2 years ago with 7 notes
#personal  #work  #nerdy  #math  #programming  #python  #poker  #math  #random  #sequence  #permutation  #RNG  #PNG  #never  #xkcd  #shuffling  #shuffle  #code  #generate  #baby 
ivogeorgiev:

lynchlegion:

Amazing programming joke. xD

That’s fucking epic.

I don’t wear glasses…

ivogeorgiev:

lynchlegion:

Amazing programming joke. xD

That’s fucking epic.

I don’t wear glasses…

(Source: jonhollow, via fuckyeahcomputerscience)

— 2 years ago with 897 notes
#glasses  #java  #dev  #developers  #programming  #software  #engineering  #C  #csharp  #sun 
matthen:

An animation I made in mathematica roughly showing how the planets will move relative to the Earth throughout 2012. I found it quite hard to make a mapping of the solar system which keeps the Sun at the centre, and puts the planets roughly in a horizontal line- whilst roughly showing what order they appear in the sky. [code]

matthen:

An animation I made in mathematica roughly showing how the planets will move relative to the Earth throughout 2012. I found it quite hard to make a mapping of the solar system which keeps the Sun at the centre, and puts the planets roughly in a horizontal line- whilst roughly showing what order they appear in the sky. [code]

— 2 years ago with 303 notes
#mathematica  #planets  #solar  #earth  #sun  #programming 
ilovecharts:

I’m not even messing, I’ve been keeping track.
-nfrench

ilovecharts:

I’m not even messing, I’ve been keeping track.

-nfrench

— 2 years ago with 834 notes
#wfh  #tumblr  #facebook  #fb  #myeyes  #software  #programming 
massivesalmon:

How I feel every time a program compiles and actually does what I want it to.

yes.

massivesalmon:

How I feel every time a program compiles and actually does what I want it to.

yes.

(via massivesalmon-deactivated201209)

— 2 years ago with 50 notes
#programming  #compile  #run  #programmer  #software  #computer  #program  #engineer  #engineering  #win  #rainbows