data-workers-publication/poster/data-workers-posters.py

273 lines
7.0 KiB
Python
Raw Normal View History

import random
import functions
# Data Workers
# http://www.algolit.net/index.php/Data_Workers
# ---
# My summary of the exhibition:
#
# exhibition, audio tour, introductions to machine learning processes
# machine learning, learning with machines, learning about machines, machines learning about others
# a learning situation (teaching/introducing others) after learning situations (studying/understanding together)
# ---
# Learning, understanding, co-operating, collaborating, reading ...
# ... with, through, via ...
# ... algorithms, models, stories.
# ---
subjects = ['humans', 'machines', 'machine learning scripts', 'languages', 'writers', 'readers', 'learners', 'collaborators']
actions = ['learn', 'read', 'write']
conditionals = ['while', 'if', 'or', 'as']
relations = ['as', 'with', 'in']
timing = ['']
# ---
# "can we challenge this classification somehow? for example by looking at the ambiguous elements: predicters can be writers too"
# ---
# Complexifiers as words that complexify objects/subjects.
# Adding a dimension.
# Suggesting a relation to another object/subject.
# Maybe the one object is not so different to the other?
# ---
complexifiers = ['computers', 'readers', 'writers', 'processors', 'learners', 'readers', 'writers', 'programmers']
# ---
# Calculated randomness as the current selector algorithm ...
# ---
def get_random_from_list(list):
list_length = len(list)
random_num = random.randint(0, list_length) - 1 # Because len() always starts at 1
random_item = list[random_num]
return random_item
# ---
# Another algologic is possible ...
# ---
def draft1():
for i, subject in enumerate(subjects):
if i + 1 < len(subjects):
print('---------')
print(conditionals[i % len(conditionals)],
subject,
'({})'.format(complexifiers[i % len(complexifiers)]),
actions[i % len(actions)],
'...')
print('---------')
# draft1()
# ---------
# while humans (computers) learn ...
# ---------
# if machines (readers) read ...
# ---------
# or machine learning scripts (writers) write ...
# ---------
# as languages (processors) learn ...
# ---------
# while writers (learners) read ...
# ---------
# if readers (readers) write ...
# ---------
# or learners (writers) learn ...
# ---------
def draft2():
for subject in subjects:
print(
get_random_from_list(conditionals),
subject,
'({})'.format(get_random_from_list(complexifiers)),
get_random_from_list(actions),
get_random_from_list(subjects),
'...'
)
draft2()
# if humans (writers) write machine learning scripts
# as machines (writers) write machines
# as machine learning scripts (writers) read readers
# or languages (readers) read machine learning scripts
# if writers (programmers) write humans
# or readers (computers) write machines
# if learners (readers) write learners
# as collaborators (writers) write writers
# ---
# Selection of words from the Data Worker pads
# What words are used to describe the exhibition, the projects, the intentions, the story?
# ---
padadj = ['voice', 'model', 'human', 'visionary', 'algorithmic', 'programming', 'editing', 'assisting']
padsubjects = ['voices', 'models', 'humans', 'visionaries', 'algorithmic writers', 'programmers', 'editors', 'authors', 'assistants']
padverbs = ['understanding', 'extracting', 'using', 'manipulating', 'plotting', 'writing']
specifics = ['with intent']
def draft3():
for subject in padadj:
print(subject)
print(get_random_from_list(subjects))
print('---')
# draft3()
# voice
# humans
# ---
# model
# collaborators
# ---
# human
# learners
# ---
# visionary
# machines
# ---
# algorithmic
# readers
# ---
# programming
# machine learning scripts
# ---
# editing
# collaborators
# ---
# assisting
# machine learning scripts
# ---
def draft4():
for verb in padverbs:
print(verb)
print(get_random_from_list(subjects))
print('(as {})'.format(get_random_from_list(padsubjects)))
print('---')
# draft4()
# understanding
# collaborators
# (as editors)
# ---
# extracting
# machine learning scripts
# (as models)
# ---
# using
# machines
# (as visionaries)
# ---
# manipulating
# collaborators
# (as voices)
# ---
# plotting
# machine learning scripts
# (as humans)
# ---
# writing
# machines
# (as models)
# ---
# Using frames (sentences) to play with the subject words.
# Nice how the sentences are already dynamic in itself,
# it makes the game of exchanging words more interesting.
#
# But as a visual language it's perhaps a bit too much,
# too subtle for something like a poster.
#
# clarity <-------------------> interesting wordplays
# generated <-------------------> written
#
# ---
# From: Course in General Linguistics - Ferdinand de Saussure
frame = 'First something called "grammar" was studied. This study, initiated by the Greeks and continued mainly by the French, was based on logic.'
def draft5():
for i in range(5):
frame = frame.replace('grammar', get_random_from_list(subjects))
frame = frame.replace('Greeks', get_random_from_list(subjects))
frame = frame.replace('French', get_random_from_list(subjects))
print(frame)
print('---')
# draft5()
# First something called "languages" was studied. This study, initiated by the readers and continued mainly by the collaborators, was based on logic.
# ---
# First something called "writers" was studied. This study, initiated by the collaborators and continued mainly by the humans, was based on logic.
# ---
# First something called "machine learning scripts" was studied. This study, initiated by the collaborators and continued mainly by the humans, was based on logic.
# ---
# First something called "readers" was studied. This study, initiated by the machine learning scripts and continued mainly by the collaborators, was based on logic.
# ---
# First something called "collaborators" was studied. This study, initiated by the machine learning scripts and continued mainly by the learners, was based on logic.
# ---
def draft2html():
tmp = ''
for subject in subjects:
print(
get_random_from_list(conditionals),
subject,
'({})'.format(get_random_from_list(complexifiers)),
get_random_from_list(actions),
get_random_from_list(subjects),
'...'
)
row = '''
<tr>
<td>{}</td>
<td>{}<sup>({})</sup></td>
<td>{}</td>
<td>{}</td>
<td>{}</td>
</tr>
'''.format(
get_random_from_list(conditionals),
subject,
get_random_from_list(complexifiers),
get_random_from_list(actions),
get_random_from_list(subjects),
'...'
)
tmp += row
html = '''
<h1>Data Workers</h1>
<br>
<br>
<table>
{}
<tfoot>
<tr>
<td></td>
<td>Algolit</td>
<td></td>
<td>
oracles<br><br>
writers<br><br>
cleaners<br><br>
informants<br><br>
readers<br><br>
learners<br><br>
</td>
<td></td>
</tr>
</tfoot>
</table>
<small>The exhibition is open from the 28th of March untill the 28th of April, between 10:00h and 18:00h.</small>
<br>
<small>www.algolit.net</small>
<small>www.mundaneum.org</small>
'''.format(tmp)
functions.write_html(html, 'data-workers.html')
draft2html()