Digital Cut Up- RWET Assignment 3

The digital cut-up. Create a notebook program that reads in two or more texts and stores portions of them in Python data structures. The program should create textual output that creatively rearranges the contents of the text. Use functions from the random module as appropriate. You must use lists and dictionaries as part of your procedure. Choose one text that you created with your program to present in class.


In [4]:
text1=[line.strip() for line in open("HW3_texts/cybernetic_bacteria.txt")]
In [6]:
text1
Out[6]:
['Cybernetic Bacteria is an ongoing trans- disciplinary investigation which brings together art, philosophy, microbiology and digital technology to examine the relationship of the emerging science of bacterial communication to our own digital communications networks, look- ing in particular at “packet data” and bacterial quorum sensing. The project was developed within the context of Dumitriu’s ongoing research into micro- biology and more specifically her re- search involving normal flora bacteriology through art practice.',
 'The project is framed within Dumitriu’s role as artist in residence in The Centre for Computational Neuroscience and Robotics (CCNR) at The University of Sussex, which places her at the heart of one of the largest artificial life (AL) research groups in the world. The prima- ry concern of the group is trying to understand what actually constitutes life and attempting to model it, or even recreate it through artificial processes (which are generally computational but could include wet processes too). For many researchers there, life can be considered an abstract concept, not directly linked to biological processes. Through her residency, which started in 2006, she is able to research complex systems through simulation and modeling. In particular she is concerned with evolutionary and adaptive computational systems to which bacteria (as the simplest living organisms) are strongly relevant [1].',
 '',
 'Dumitriu’s collaborators in Cybernetic Bacteria are Simon Park, a microbiologist based at The University of Surrey, Blay Whitby, a philosopher specializing in artificial intelligence and ethics, Tom Keene, a freelance interactive media artist, and Lorenzo Grespan, a freelance programmer specialising in artificial life and computational neuroscience.',
 'Bacteria and Communication',
 'The initial ideas for working with chemical communication stemmed from a discussion between Dumitriu and Park about bacterial communication and new insights recently discovered by Bonnie Bassler at Princeton University. Bassler studies a phenomenon called quorum sensing in bacteria, which she describes as:',
 'Bassler’s work has shown that bacteria are continually sending messages to each other, in the form of bursts of hormones (such as Homoserine lactones) and other signaling chemicals. They are also able to communicate to any eukaryotic animal or plant cell (and in some cases affect their structure also). As Lynn Margulis and Doran Sagan stated, “Life did not take over the globe by combat, but by networking" [3].',
 '“a process that allows bacteria to communicate using secreted chemical signaling molecules called autoinducers. This process enables a population of bacteria to collectively regulate gene expression and, therefore, behavior” [2].',
 'Intricate bacterial communication techniques, such as quorum sensing, chemotactic signaling (detecting harmful or favourable substances in the environment), and plasmid exchange (e.g. for transfer of antibiotic resistance genes) are now being investigated as a form of social intelligence as it is realized that these so called ‘simplest’ of life forms can work collectively, obtain information about their environment and use that information in meaningful ways.',
 'This means that bacteria are able to pass signals between them in relatively complex ways. The simplest form of this is by signaling their presence within the colony, a message which effectively states: “I’m here”, through a burst of hormone.',
 'To enable this level of complexity, bacteria communicate using a wide range of different biochemical agents and use intricate intercellular signaling mechanisms. Research continues into how precisely these messages are being sent and received, but the potential of that research is surely clear. If we can decode the bacteria’s communication signals, then we can communicate with them and perhaps ask them to behave in different ways. Bacterial communication offers the potential of a powerful new direction in infection control, which as the power of antibiotics continues to dwindle in efficacy seems increasingly attractive.',
 'Cybernetics',
 'The messages bacteria pass can have a global impact, as they are able to send signals to one another, theoretically ad infinitum, and learn through their inter- actions. This phenomenon is well de- scribed by the field of cybernetics, which is the interdisciplinary study of the structure of complex systems, especially communication processes, control mechanisms and feedback principles, often using computational methods.',
 'Complex Networks',
 'The way in which bacterial life threads across our planet, through the soil, the water and the ice, constantly passing messages and flagging its effective message of “I’m here” to other bacteria, forms a complex and diverse network of microbial life, particularly in terms of ability to communicate. This is very much echoed within human digital communications networks such as the Internet. Data traffic travels through the Internet by being routed through active nodes, which flag their activity by streaming “packet data” signals, which also effectively say: “I am here” and “I am active”.',
 '',
 'Since 1959 all complex networks have been treated as randomized networks, based on the work of Paul Erdos and Alfred Renyi, who were studying net- works seen in life sciences. They believed that such complex networks could be modeled by connecting nodes with',
 'randomly set links, which produced a highly democratic system with nodes in the network having more or less the same number of links. So when in 1998 a project to map the world wide web was undertaken, the researchers, who included Albert-László Barabási, anticipated that a randomized network would be found. But this was not to be the case, the results actually showed that, although most nodes had just a few links, there were in fact a small number of highly connected nodes, which they called “hubs” and in this sense the network can be described as having no scale, as being a “scale-free network”. Scale-free net- works have also been observed in the bacteria such as Escherichia coli at a cellular level in their metabolic networks [4].',
 'Cybernetic Bacteria 2.0',
 'Cybernetic Bacteria 2.0 is a multiple screen projection, that makes explicit the correlations between bacterial and human communications networks dis- cussed earlier. The work combines, in real time, the raw network traffic taking place live around the gallery (including web traffic, mobile technology and Blue- tooth) and data from a time-lapse film of bacterial communication occurring (involving two strains of genetically modified [GM] bacteria, which will indicate, by changing colour or glowing, the communication taking place). From those two sources a new cellular automata artificial life form based on Conway’s ‘Game of Life’ was generated [5].',
 'To create this work a purple bacterium called Chromobacterium violaceum was used. This bacterium emits and detects a chemical signal. When a population hits a critical density, the concentration of the chemical signal reaches a threshold, which the bacterium is able to detect responding by turning on production of the purple pigment. The white coloured, genetically modified form Chromobacterium violaceum CV026 was also used to detect chemical signals and responded by producing a purple pigment also, but it cannot produce the chemical signal itself. The other bacterium used was Serratia marcescens; it is also able to send out signals but cannot communicate to the CV026. Colonies of this bacterium are a striking red colour due to the production of the pigment prodigiosin.',
 'Human “airborne” communication was detected using a specially built de- vice, which consisted of a network of micro-controllers, each searching for other electronic devices in the immediate',
 "environment. Each time a new device was discovered (from touch and remote RFID tags, Bluetooth devices and wire- less activity) its unique ID was recorded and sent to a computer generating artificial life in a variation of Conway's Game of Life. The data is used as a trigger to turn on a small burst of coloured pixels at a random location on the screen.",
 'The presence of new pixels affects the global behaviour of the game, as in the original Game of Life, and echoes the behaviour of the bacteria, each pixel stays on or is turned on if and only if two or three neighbouring pixels are also on. Furthermore, white pixels become purple if they have a purple neighbour. Red pixels do not affect other pixels’ colour but only their on/off state.',
 'Conclusion',
 'The artworks described here attempt to investigate the relationship between digital and bacterial communications net- works. The research takes a threefold approach by combining artistic, philosophical and scientific methodologies through a transdisciplinary approach (focussing on microbiology and artificial life disciplines in science). They look at parallels with scale-free networks in both digital and bacterial communications networks and to do so they use performativity and participation in order to engage the audience with a visceral sense of the vast, complex, unseen communications networks that surround them.']
In [7]:
text2=[line.strip() for line in open("HW3_texts/thesis_feedback.txt")]
In [8]:
text3=[line.strip() for line in open("HW3_texts/thesis_proposal.txt")]
In [9]:
text2
Out[9]:
['',
 'His opening statement is a bit hard to understand but the description is good. I wonder though if this is "post-human". Will bots have any reason to exist without humans?',
 '',
 "like the concept and motivation behind this project very much but i'm having a hard time understanding how this will work technically - are the bots and protozoa running off random algorithms? or is sebastian ultimately controlling them and their behavior - it seems human input is still important here, right?",
 '',
 "there is a wonderful cell biologist at NYU's institute for systems genetics named Timothee Lionnet who does a lot of work with microsocopy: http://www.timotheelionnet.net/",
 '',
 "I find the premise interesting, though I'm curious how the implementation of the bots and protozoa. Are the bots classified to release different type of bacteria? Do the protozoa exist from the beginning on this webslide, their actions dictated by the bots?",
 '',
 "I like the concept of the human interaction with the protozoa and look forward to seeing how you execute this on a website. However, I don't understand how the bots will affect the protozoa. Are we talking about internet bots here? how will they alter a living organism?",
 '',
 'Nice concept! The description could include more of the WHY (for future reference :) )',
 '',
 'Not sure that it is post-human...since humans are a part of it... even if just as observers. "The World Without Us" is a book about what happens to the earth once humans are gone (climate change, war, whatever!) What would your world be like without humans-- are humans at all necessary to it, the flora or fauna?']
In [10]:
text3
Out[10]:
['My project takes an atiprocentric approach where humans are not in the center of it all. In fact it seeks to explore/invent/speculate/imagine the relationship between inorganic and organic primitive live forms with humans having limited agency.',
 '',
 '',
 'The audience is divided in 3 groups: Internet bots, unicellular organisms, and humans with internet and interests in exploring primitive posthuman ecosystems.',
 '',
 '**Humans** can visit a website to observe a live feed from a microscope camera. The video is of microscopic protozoa. Humans can remotely move the slide to look at different areas of the slide. Humans can slightly change the focus of the microscope though the website. Humans can also share the website in social media or write about it. Humans have no further agency.',
 '',
 '**Bots, crawlers and spambots.** Bots for short, bots can visit the website, in fact the website is a honeypot designed to attract them.',
 'As they go though forms, and hyperlinks, speeding through the website, their presence is recorded. The bots moving though the website release bacteria in the protozoa tank, feeding and giving life to protozoa.',
 '',
 '**Protozoa** are single-cell organisms,  this is important because “unicellular organisms are thought to be the oldest form of life” [reference]. Protozoa can feed, grow, reproduce and die. In other words, they can exist.',
 '',
 '### Describe your research process. What are the sources you plan to look at, who do you plan to speak to about your project. How will you approach your research?',
 '',
 'The past couple of months I have been analyzing diverse sources on posthuman thought. As well as talking to professors and colleagues about it.',
 '',
 'My future research involves interviewing microbiology experts (I plan to start with Elizabeth Hénaff). Depending on the findings I would also need to talk to a microscopy expert.',
 '',
 'I also need to research into creating a site that attracts large numbers of software visits. After talking to Shawn Van Every I am now going to talk to Yen. I might start prototyping with sites known for their bots abundance (tumblr, twitter, wordpress)',
 '',
 'Currently I am reading a couple of books: "Beyond webcams, an introduction to online robotics". Also reading "The Robot in the Garden", both by Ken Goldberg. One is more from a philosophical perspective while the other is more technical. I am considering writing to Dr. Goldberg.',
 '',
 '',
 "The concept emerges from the idea of hacking as art. How can we take a stablished system, find a small section of it and repurpose it under a different context? The idea doesn't pretend to be grand and it doesn't try to change the system. It doesn't try to fix it, it doesn't try to break it. In fact, it hopes to pass unnoticed by the system as a whole. Yet, to whomever is paying close attention, it is a prove that there is room for much more than intended, different realities, no matter how fantastical.",
 '',
 'It would be inappropriate to talk about this project without making reference to Ken Goldberg 1995 project Telegarden. Here, users around the world could visit a website and find a live stream of a garden, they could control a robotic arm to water the plants, take care of the garden and plant more seeds. The project was a reflection of the times, the breaking of physical boundaries, joining people though technology to take care of something beautiful.',
 '',
 '22 years later, the internet has change dramatically, humans are not the creature navigating though the internet. The network is dominated, some might say infested by robots; some scrolling the web for content, some spamming everything they can find, some others pretending to be large groups of individuals swaying the public discourse.',
 '',
 'This project bridges many thoughts together, lastly in this list, is the posthuman influence. I want to imagine a ecosystem where humans are not in the center, perhaps because there is no center. Where inorganic life can directly interact with organic life. At the most primitive level.']

Remove all the empty lines

In [11]:
text1=[line for line in text1 if line!='']
text2=[line for line in text2 if line!='']
text3=[line for line in text3 if line!='']
In [12]:
text2
Out[12]:
['His opening statement is a bit hard to understand but the description is good. I wonder though if this is "post-human". Will bots have any reason to exist without humans?',
 "like the concept and motivation behind this project very much but i'm having a hard time understanding how this will work technically - are the bots and protozoa running off random algorithms? or is sebastian ultimately controlling them and their behavior - it seems human input is still important here, right?",
 "there is a wonderful cell biologist at NYU's institute for systems genetics named Timothee Lionnet who does a lot of work with microsocopy: http://www.timotheelionnet.net/",
 "I find the premise interesting, though I'm curious how the implementation of the bots and protozoa. Are the bots classified to release different type of bacteria? Do the protozoa exist from the beginning on this webslide, their actions dictated by the bots?",
 "I like the concept of the human interaction with the protozoa and look forward to seeing how you execute this on a website. However, I don't understand how the bots will affect the protozoa. Are we talking about internet bots here? how will they alter a living organism?",
 'Nice concept! The description could include more of the WHY (for future reference :) )',
 'Not sure that it is post-human...since humans are a part of it... even if just as observers. "The World Without Us" is a book about what happens to the earth once humans are gone (climate change, war, whatever!) What would your world be like without humans-- are humans at all necessary to it, the flora or fauna?']
In [13]:
text2[0]
Out[13]:
'His opening statement is a bit hard to understand but the description is good. I wonder though if this is "post-human". Will bots have any reason to exist without humans?'
In [14]:
text2[0].split()
Out[14]:
['His',
 'opening',
 'statement',
 'is',
 'a',
 'bit',
 'hard',
 'to',
 'understand',
 'but',
 'the',
 'description',
 'is',
 'good.',
 'I',
 'wonder',
 'though',
 'if',
 'this',
 'is',
 '"post-human".',
 'Will',
 'bots',
 'have',
 'any',
 'reason',
 'to',
 'exist',
 'without',
 'humans?']

Counting the number of words in a sentence:

In [15]:
len(text2[0].split())
Out[15]:
30
In [16]:
import random
from random import randint
print(randint(0, 9))
7
In [17]:
ran=randint(0,len(text2[0].split()))
In [18]:
ran
Out[18]:
5
In [19]:
[randint(0,len(line.split())) for line in text1 if randint(0,9)>7]
Out[19]:
[18, 38, 71, 13]

Lets try a function

In [99]:
list_text1=[]
In [85]:
list_text2=[]
In [126]:
def modifier(line):
    words=line.split()
    numb=randint(0,len(words)-4)
    selected_words=[words[numb],words[numb+1],words[numb+2],words[numb+3]]
    return(" ".join(selected_words))
In [127]:
list_text2=[]
[list_text2.append(modifier(line)) for line in text1 if (randint(0,9)>5 and (len(line.split())>4))]
Out[127]:
[None, None, None, None, None, None, None, None]
In [128]:
list_text2
Out[128]:
['programmer specialising in artificial',
 'recently discovered by Bonnie',
 'form of bursts of',
 'potential of a powerful',
 'to map the world',
 'it cannot produce the',
 'white pixels become purple',
 'research takes a threefold']
In [129]:
list_text3=[]
for x in range(0, len(list_text2)):
    list_text3.append(modifier(random.choice (text2)))  
In [130]:
list_text3
Out[130]:
['like the concept of',
 'description could include more',
 '"post-human". Will bots have',
 'this will work technically',
 'description could include more',
 'release different type of',
 '(for future reference :)',
 'description is good. I']
In [131]:
def concat(t1,t2):
    for line in range(0,len(t1)):
        print(t1[line]+" " +t2[line])
In [133]:
concat(list_text2,list_text3)
programmer specialising in artificial like the concept of
recently discovered by Bonnie description could include more
form of bursts of "post-human". Will bots have
potential of a powerful this will work technically
to map the world description could include more
it cannot produce the release different type of
white pixels become purple (for future reference :)
research takes a threefold description is good. I