Pythonism

code and the oracular

Simple Python Project: Markov Text

with 2 comments

consider this sentence

“the cat sat on the mat”

we can see the following about it

the word “the” is followed by “cat” and “mat”
the word “cat” is followed by “sat”
the word “sat” is followed by “on”
the word “on” is followed by “the”

so from this sentence we can construct a dictionary like this

catsat = {"the":["cat","mat"],
          "cat":["sat",],
          "sat":["on",],
          "on":["the",],
          "mat":[]}

Read the rest of this entry »

Written by Luke Dunn

December 31, 2015 at 9:09 am

Prime Numbers in Python Video

leave a comment »

I just did this vid on Primes in Python, which is my top ranking popst here…

Read the rest of this entry »

Written by Luke Dunn

December 30, 2015 at 5:15 pm

Posted in Math, Primes

The Journey – part i

with one comment

The good ship Aleph was part of the way along a trajectory through hyperspace that joined the two points designated by the coordinates #1928.3746.5547, its starting point, and #5647.3820.9101, its destination.

The Aleph was spherical, nearly two kilometers across. Seamlessly constructed by swarms of replicators that had oh-so-patiently munched through millions of tons of mineral feedstock gathered from asteroids in the system where it was grown. On the occasion of its delicate extrusion from the nanomass, the immaculate finished result – a whole functioning starship, had astonished the observing sentiencies gathered around the site. Poems and bursts of song celebrated this glory among technological artefacts… this vessel whose main generators harnessed the exawatts of power more typical of a small star.
Read the rest of this entry »

Written by Luke Dunn

November 28, 2015 at 5:08 pm

Posted in Creative Writing

Tagged with , , , ,

The Mystery of the Japanese Bow

leave a comment »

Dear Steve,

I have difficulty nodding. I have had it for years. I wonder what it is. is it because I am blocking my capability to say yes and affirm life?

I am trying bodywork, nodding and moving my head around on the neck while standing and breathing deeply.
Read the rest of this entry »

Written by Luke Dunn

November 11, 2015 at 9:51 am

Posted in Creative Writing

Tagged with , ,

Behind a Polyester Veil

leave a comment »

Two mugs of heavily spiced chai for wake-up. The real Indian spice mix is way hotter than the re-marketed british brands that became popular. The heat comes from the ginger and black pepper, no chilli. There’s also lots of cardamom, and a whiff of nutmeg. I wonder if that little bit of myristicin potentiates the high of the chai. It is there to teach your digestion that everything is ok, at its best its a little like drinking lava, a beneficial lava that purifies as it travels down the gut. Read the rest of this entry »

Written by Luke Dunn

September 6, 2015 at 5:37 pm

Posted in Creative Writing

Tagged with , , ,

Mind-loops evaded

leave a comment »

I will showcase my introspection – what is it like? aiming to write details of situations with large segments describing the states of mind of the participants, the main one of whom will be you.

a rounded piece with a diversity of subjects that includes all the above sections. squeezing it out one little bit at a time, pacing yourself and not looking ahead to the finish until time is right.

not censoring is crucial
Read the rest of this entry »

Written by Luke Dunn

September 6, 2015 at 2:05 pm

Chambers within the Mansion of Self

leave a comment »

Dear Steve,

I just blogged that last addition to your letter, and then some thought took hold of me that I should rest, but really I am not tired at all. After all you, yourself, write and write and write when you are in the mood!
Read the rest of this entry »

Written by Luke Dunn

May 29, 2015 at 10:01 am