Pythonism

code and the oracular

Selfishness and Politics

leave a comment »

There was once a great new idea propagated (centuries ago) which grew to be called “DIY” which stood for “Do It Yourself”.

This was a craze that overtook thousands of citizens where they were able to save money by not paying builders who, as part of their fee, usually reserved the right to tell filthy jokes and sexually harass all female passers by as they were working on the client’s property. But it went further than that in time when it was found that ordinary folk could learn about politics and economics through a popular system called Facefuck. Printed copies, containing user submitted messages, were distributed in the market squares morning and evening. This grew hugely popular when people started to realise they could have a convenient narcissistic relationship where no other real human company was needed. The DIY ethic was reaching its pinnacle. All you had to do was stay alone and contribute to Facefuck.
Read the rest of this entry »

Written by Luke Dunn

August 4, 2016 at 9:29 pm

Posted in Creative Writing

Tagged with ,

Letter to a friend about psychiatry

leave a comment »

Dear Friend,

Psychiatrists regard those of their patients who manage to reenter the economy at the lowest possible pay scale as successes.

They are one of a number of different groups to imply that this current state of capitalism is a state of natural reality, i.e. this is the only way it can be.

I have been long of the persuasion that is normality itself as a concept and a normative ideal that is broken, not our minds (as so-called “mad” people) that are broken.

Read the rest of this entry »

Written by Luke Dunn

June 15, 2016 at 9:10 am

Posted in Creative Writing

bash: make spoken slide presentation of text in movie form for youtube

with one comment

you can turn your youtube channel into an automated platform to read out all your thoughts or work

Screenshot at 2016-05-29 14:58:10

Read the rest of this entry »

Written by Luke Dunn

May 29, 2016 at 1:18 pm

surprise!

leave a comment »

a0076

Written by Luke Dunn

March 8, 2016 at 3:44 pm

Posted in Uncategorized

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

Mountain Ranges and Dyck Words

leave a comment »

Thinking of LISP, look at this function to generate factorials

(defun factorial (x)
(if (= x 0) 1
(* x (factorial (- x 1)))))

The first thing people are usually told to practise while studying LISP is how to make sure the brackets ‘work’. It takes a knack to be able to check even a simple function like this recursive one above.

But you have a very similar task if you write python code, because almost always an indent matches to an open bracket and a de-dent to a closed one. Perhaps because indents are more spatial, somehow it seems easier to spot an indent error in python than a bracket error in LISP…

Brackets (or indents) can have a combinatorial character too. How many ways can you write an expression using a given number of pairs of brackets so that the resulting expression will be ‘legal’? I mean by this that ‘legal’ is describing an expression where you don’t close more brackets than you’ve already opened at any point.
Read the rest of this entry »

Written by Luke Dunn

December 9, 2015 at 11:08 am

Follow

Get every new post delivered to your Inbox.

Join 84 other followers