User:Euna/prototyping 13: Difference between revisions

From XPUB & Lens-Based wiki
No edit summary
No edit summary
Line 5: Line 5:
==JupiterLab==
==JupiterLab==


- command language : pythone (also, wiki language. ex. instead of #, use ==headline==) <br>
- command language : pythone (also, wiki language (marke-up language). ex. instead of #, use ==headline==) <br>
- run on offline + in browser (easy to publish) <br>
- run on offline + in browser (easy to publish) <br>
- have its library, with ? at the end (ex. random?), we get its explanation <br>
- have its library, with ? at the end (ex. random?), we get its explanation <br>
Line 153: Line 153:


- Both early code and weaving pattern used punch card -> making pattern!
- Both early code and weaving pattern used punch card -> making pattern!
- all unicode : http://xahlee.info/comp/unicode_circled_numbers.html


- Pattern 1
- Pattern 1
Line 241: Line 243:




== Import text to Python ==
== Read text to Python ==


- local text
- local text
Line 306: Line 308:
</source>
</source>



 
=Prototyping 1 (30/09/2020)=
 
 
==JupiterLab==
 
<b> Phython code </b>
 
- add url : [marked word](https://www...)
 
- while (loop with condition ex.while True) or for -> for in for (with <b> indentation! </b>) is nesting
 
 
==Insert Image==
 
- im.mode : RGB, RGBA(Red, Green, Blue, Alpha-for transparency), l(greyscale)
 
- im.thumbnail( (150, 150) ) : size automatically saved (to cancle, im.resize((100,100)) or restart from im = Image.open("b-.jpeg"))
 
- im.convert :not automatically saved. image pixelate key2.convert("1", dither=Image.NONE) or change the mode with key2.convert("l")
 
- urlopen image can be saved on server with key3.saved (also possible with terminal, saving locally)
 
- ASCII art : http://jwilk.net/software/python-aalib
 
<source lang=python>
from PIL import Image
import aalib
screen = aalib.AsciiScreen(width=100, height=50)
 
f = Image.open("b.jpeg")
f = f.convert('L').resize(screen.virtual_size)
screen.put_image((0, 0), f)
print (screen.render())
</source>
 
<pre>
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ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XXSS2onilliiivmWWQQQQQQQQQQQQQQQQQQ
QQQQQQQQQQQQQQQQQQmc|vnXXSS2S2SS2S2S2S2SS2SS2S2SS2SS2XS2XSSXXXSXXSSSSSSonvvIiuQWWQQWQQQQQQQQQQQQQQQQ
QQQQQQQQQQQQQQQQQQQQooXXS2SS2S2S2S2S2S2S2S22S2S2S2S2XS2XS2SSS2XSSSSSS2S22onvnWWWQQQQQQQQQQQQQQQQQQQQ
QQQQQQQQQQQQQQQQQWW#2X22S2SoX2S22222S2S2222SoSoSoS2222S22S222S2S2S2S2S2S2222odWWWQQWQQQQQQQQQQQQQQQQ
QQQQQQQQQQQQQQQQQWWoS22So222S222222So2o2o22o2o2222222222222S2222S2S2S2S2S2S2S2XWWQQQQQQQQQQQQQQQQQQQ
QQQQQQQQQQQQQQQQQWSo2o2o2222o2oo2ooo2ooo2ooooo2ooooooooo222o22oSo222o222222SoS2$WQQWQQQWQQQWQQQQQQQQ
QQQQQQQQQQQQQQQQW#nooooononooooooooooononnonoonoooooooo2oooo2ooo222oSo222222222XWWQQQQQQQQQQQQQQQQQQ
QQQQQQQQQQQQQQQQWZnnnnnnnnnnnnnnnnnnnnnnnnvnnnnnnnonnnooooooo22222o2o22222SoS222$WWQWQQQQQQQQQQQQQWQ
QQQQQQQQQQQQQQQQW1nnvnvvvvnvnvvnvvvvvvvvvvnvnvnvnvnnnooooooooo2o2222222222222222dWWQQQQQQQQQQQQQQQQQ
QQQQQQQQQQQQQQQW#nnnvvnvvvvvvvvvvvnvnvvnvvvvvnvnvnvnnnnnnoooo2o22S2S2S2S2S2S2222oQWQQQQQQQQQQQQQQWQQ
QQQQQQQQQQQQQQQWZonvnvvvvvvvvvvvvvvvvvvvvvvvvvvvvnvnvnnnnoooo222S2S2S2SS2S2S2X22oWWQQQQQQQQQWQQQQQQQ
QQQQQQQQQQQQQQWWnonvvvvvIIvIvIvvvvvvvvvvIvvvvvnvnvnvnnnnnnoo2oS22S2SSSSSSS2X2S22omWWQQQQQQQQQQQQQQQQ
QQQQQQQQQQQQQWWSnnnvnvvvvIIIIvIIIIvIIvIIvvvIvvvvvnvnvnvnvnoo222SS2XS2SS2S2S2S2SoomWQQQQQQQWQQQQQQWQQ
QQQQQQQQQQQQWBSooo>-iiIvIIIvIIIvIvlvvIvIIIvIvvvvI|"^--=%nno2SoS2SSS2XS2SSS2SS2So2mWQWQQQQQQQQQQQQQQQ
QQQQQQQQQQQWB2S22on,-=.~<vvIlvIIIIvIIvIvvIIv>~- .  ._%vnoo2S2S2S2S2SS2XS22S22S2SomWWQQQQQWQQQQQQQQQQ
QQQQQQQQQWW#2XS2Sooos, . -vvvvvvvvvvvvvvvv}+ . .._ivnoo2o22S2SSSSSSS2X2SSS2S2222omWQQQQQQQQQQQQQQQQQ
QQQQQQQQQQ#2X2S222oonvns,ivvvnvnnnnnnnnvnvv<<iivvnnnno222S2S2SS2SS2S2S2SoSo2222oomWQWQQQQQQQQQQQWQQQ
QQQQQQQQWWoX2S2SSSo2oonnoonooo2o2oo2oonononnvnnnnnnno22S2S2S2S2XS2S2S222So2222oonmQWQQQQQQQQQQQQQQQQ
QQQQQQQQW#oo2222oo222o2oo222SXSXSSSS222ooooooooooo2oSoS2S2S2S2S22So2o22ooooooooonmQQQQQQQQQQQQQQQQQQ
QQQQQQQQW#nnonnnnnonooo2222!"!""!"!!1X22SoSo22o2oo22oooo2oo2o22o2oo2oooooooononnnQQQQQQQQQQQWQQQWQQQ
QQQQQQQQQmvvvvvvvvvvvvnn1+ -......__.-{ooooooonnnnvnnnnnnonnnonnnonnnnnnnnnnvnnvdQWQQQQQQQQQQQQQQQQQ
QQQQQQQQWQzillllllllIvI}-.:.:.::=|nv>..+ooonnnvvvIvvvvvvvvvvvvvnvnvnvnvvnvvvnvvvmQQQQWQQQQQWQQQQQQQQ
QQQQQQQQQWm|iiiiiiilill> -.:.::.:-=--...vnnvvvIvlIllllllIvIvvIvIvvvvvvvvvvvvvvvqQQQQQQQQQQQQQQQQQQQQ
QQQQQQQQQWWaiiiiiiiiiii|...:-:.:.:..... vvvvvIIlllliliiliillillllllIIvIvvIvvvvnQWQQWQQQQQQQQQQQQQQQQ
QQQQQQQQQWQQp|ii|i|i||||=..-.--........%vIlIllliliiii||+|iiiiiiiiillllllllllInQWQQQQQQQQQQQWQQQQQQQQ
QQQQQQQQQQQWWma||i||||||+|.-........ _%lliliii|i|||=:::=||iiiiiiiiiiilillillnmWWQQQQQQQQQQQQQQQQQQQQ
QQQQQQQQQQWQQWWwc|||i|||+||==__.:__=iliiiii||||+=:-:.=+||||i|i|iiiiiiiiiiiiwWQQQQQQQQQQQWQQQQQQQQQWQ
QQQQQQQQQQQQWQWQQmo%|||||||||i|i|iiiii|ii||||=:::::=||+|||||i|i|i|i|iii|iimWWWQQQQQWQQQQQQQQQQQQQQQQ
QQQQQQQQQQQQQQQQWQQQgw%>|||||||||++||+||iis=-::;=||||+|||||||||i|||i|||ivvXXQWQWQWQQQQQQQQQQQQQQQQQQ
QQQQQQQQQQQQQQQQQQQWQWWQmwwa%|+||+|iI1nn1**i=||ii|||||||+||||||||||||ilIvvno2X$WQQQWQQQQQQQQQQWQQQQQ
QQQQQQQQQQQQQQQQQQQQQQQQWQWWQQ>:..=|+|||||||i|||||||||+|+|=|=|+|+|iivvviiIvnnoSX$WWQWQQQQWQQQQQQQQQQ
QQQQQQQQQQQQQQQQQQQQQQWQQQWBY(:.;==:==+++|+||||||||||+|++|+||||iilIvvvvi+iilvnno2XWWQQQQQQQQQQQQQQQQ
QQQQQQQQQQQQQQQQQWQQQWQQQWDvv;.=|||;;;====+++|+||||+|+|+||||||iillIvvvvv|=||lIvo22X$WQWQQQQQQQQQQQQQ
QQQQQQQQQQQQQQQQQQQQQQQQWW1nn>--<iI>==;;;====+++=+=|+|||||||iilllvvvvvnvl|+||lvnn2o2$WQQWQQQQQWQQQQQ
QQQQQQQQQQQQQQQQQQQQQQQQQW2vvi:=iiIi=====;===|+||||||||||iiilllvIvvvnnnvnv|+|iivvoS22WWQQQQQQQQQQQQQ
QQQQQQQQQQQQQQQQWQQQQQWQWQmci|:.=i|=|+i|+===|+||+||||iilvvvnnvnvnnnnvnnnnvl|+||IvnoS23WWWQQWQQQQQQQQ
QQQQQQQQQQQQQQQQQQQQQQQQQWWQga%i||iawoIi||+|+|||iilIvnnnooo22SSXXXXXo2oonovv=||iIvno2SXQQQQQQQQQQQQQ
QQQQQQQQQQQQQQQQQQQQQWQQQQQWWQQQQQQQQ#vii||||iivvnvnnnno22SS2SSXXXZZUZXXnonvi=+|lvvo2SXWWQQWQQQQQQQQ
QQQQQQQQQQQQQQQQQQQQQQQQWQQQQQWQQQQQWElIliiilvnnonnooo22S2S2XXXXXZZZZUZZX2nvl|+||lvnnonmQQWQQQQQQQWQ
</pre>

Revision as of 10:41, 1 October 2020

Prototyping 1 (21/09/2020)

JupiterLab

- command language : pythone (also, wiki language (marke-up language). ex. instead of #, use ==headline==)
- run on offline + in browser (easy to publish)
- have its library, with ? at the end (ex. random?), we get its explanation
- with "enter", change the line in the cell
- "enter + shift", command to execute the command -> on the next line, spit out the output immediately (like javascript console)
- consist of "Console" and "Notebook"


Console

-like terminal, command line interface. direct way to see the result, but, cannot be saved


Notebook

- for hybrid publishing interface (but +, console)
- fast editing and publishing possiblle ( faster than using hub)
- Text (Markdown) + Code (Python)
- modifying / rerunning the cell is possible


Phython code

- https://docs.python.org/3/tutorial/classes.html#class-objects
- "17" + 29 -> error / "17" + "29" -> 1729
- x=x+1 same with x+=1
- type : str (for text ex. "17"), int(number), float(number with fractional parts), boolean(true/false), list
- calculation with text is not possible (sauf, * ex."hello"*2 -> hellohello)
- x=["a", "b", "c"] -> x[1]=b / x[-1]=c(negative number starts from the end)
- print() -> empty line output
- for For, the space before inner-command is important

for x in "Michael":
    print(f"hello {x}")
print("End") 

-> hello M 
   hello i
   ... 
   hello l
   End  # appeals only at the end

- input random
random.random -> 0.234546546678
random.randint(0,5) -> 4 (random number between 0-4)
random.randint(0,len(x)) -> 1 (number between 0-2)
random.choice(x) -> c


Generated poem

- A house of dust by Alison Knowles https://hub.xpub.nl/bootleglibrary/read/465/pdf
- My generated poem input and output

import random
from random import choice

ani = ("mosquitos", "pigs", "kangaroos", "tunas", "cats")

cha = ("blue", "laziest", "numbest", "most stinky", "dullest")

for x in range (10) :
    n = random.randint(3, 30)   # when the number is too big, doesn't give a sufficient random one (like, 99999 -> always, a number of 5 ciphers)
    a = choice(ani)
    c1 = choice(cha)
    c2 = list(cha)   # to remove an element in tuple, must change to list (list = ["",""], tuple = ("","")
    c2.remove(c1)    # c2 is a list except the result of c1
    c2 = choice(c2)
    print(f"Amongst the numbers of {n} of {a},")
    print(f"the {c1} one and {c2} one are selected as the king and queen of {a}!")
    print()
Amongst the numbers of 5 of mosquitos,
the blue one and dullest one are selected as the king and queen of mosquitos!

Amongst the numbers of 13 of cats,
the laziest one and dullest one are selected as the king and queen of cats!

Amongst the numbers of 12 of cats,
the dullest one and most stinky one are selected as the king and queen of cats!

Amongst the numbers of 11 of kangaroos,
the numbest one and blue one are selected as the king and queen of kangaroos!

Amongst the numbers of 7 of cats,
the dullest one and blue one are selected as the king and queen of cats!

Amongst the numbers of 26 of tunas,
the laziest one and numbest one are selected as the king and queen of tunas!

Amongst the numbers of 6 of tunas,
the laziest one and dullest one are selected as the king and queen of tunas!

Amongst the numbers of 13 of pigs,
the numbest one and dullest one are selected as the king and queen of pigs!

Amongst the numbers of 4 of kangaroos,
the numbest one and blue one are selected as the king and queen of kangaroos!

Amongst the numbers of 18 of pigs,
the laziest one and blue one are selected as the king and queen of pigs!


Prototyping 2 (28/09/2020)

JupiterLab

Terminal

- Console where can test python language locally

- easily access to local file

type "python3" + enter   #not the version 2.7!
exit()    #to finish


Phython code

- b=str(3) = c="3"

- "software" != "Software" (for Python, uppercase and lowercase are different string)

- a.replace ('soft','hard)

- a. + tab -> shows what we can chose after "."

- \(back slash) is used to escape characters

print('Euna's cookie')   #Error, cause after a, is already closed
print('Euna\'s cookie')   #output, Euna's cookie

a = "\\"
print(a)   #output, \


Pattern

- Both early code and weaving pattern used punch card -> making pattern!

- all unicode : http://xahlee.info/comp/unicode_circled_numbers.html

- Pattern 1

import random
characters = ['╱','╲']   #if you do with '/','\' use '/','\\'
width = 100
height = 50
line = ''
for y in range(height):
    for x in range(width):
        line += random.choice(characters)
    print(line)
    line = ''
╱╲╲╱╱╱╲╱╲╱╲╲╲╲╲╲╱╱╲╲╲╲╱╱╲╲╲╱╲╱╲╱╱╱╲╲╲╲╲╱╲╱╲╱╱╲╱╲╱╱
╲╲╲╱╱╲╱╱╱╲╲╱╲╲╱╱╱╱╱╲╲╲╲╲╲╲╲╲╱╱╱╱╲╱╱╱╲╱╱╲╱╱╲╱╱╲╱╲╱╱
╲╲╱╱╲╲╱╲╲╱╲╱╱╲╱╱╲╱╲╱╱╲╱╱╲╲╲╲╱╱╲╱╱╲╲╲╱╱╲╲╲╲╲╱╲╱╲╲╲╲
╲╱╲╲╱╱╲╲╲╱╲╲╲╱╲╱╱╲╲╲╱╱╲╱╱╲╱╲╲╲╲╱╱╲╲╲╱╱╲╲╱╱╱╱╱╱╱╲╱╲
╲╱╲╱╱╲╱╲╲╲╲╱╲╲╱╱╲╱╱╱╱╱╲╲╲╱╱╲╱╲╱╱╱╱╱╲╱╱╱╱╲╲╲╲╲╱╲╲╱╲
╱╲╱╱╱╲╲╱╱╲╱╱╱╱╱╱╲╲╱╲╲╱╱╱╱╱╲╲╲╱╲╲╱╲╱╱╲╲╲╲╱╲╲╲╲╱╱╱╱╲
╱╲╲╱╲╲╱╲╲╱╲╲╲╲╱╲╲╱╱╲╲╱╲╲╲╲╲╲╲╲╲╱╱╱╱╱╱╱╲╲╱╲╱╲╱╱╲╲╱╱
╲╲╱╲╲╱╲╲╱╲╱╲╱╱╲╱╱╲╱╲╱╲╲╲╱╲╱╱╲╲╲╲╲╱╱╲╲╲╱╲╱╲╲╲╲╲╲╲╲╲
╲╲╱╲╱╲╱╲╲╲╲╲╱╲╲╲╲╲╱╱╲╲╱╱╱╱╲╱╲╲╲╲╲╲╱╱╱╱╱╱╱╱╲╲╲╱╲╱╲╱
╱╱╲╲╲╱╱╲╲╱╱╱╲╱╱╱╱╲╱╲╲╱╱╲╲╱╲╱╱╲╲╲╱╲╱╲╱╱╱╲╲╱╲╲╱╲╲╲╲╲
╱╱╲╱╲╱╲╱╱╲╲╱╲╲╱╲╱╲╱╱╲╲╱╱╱╲╲╱╱╱╲╲╱╲╱╲╱╲╱╲╱╱╲╱╲╲╲╲╱╱
╲╱╲╲╱╱╲╱╲╲╲╲╱╲╱╱╱╱╱╱╲╲╱╱╲╲╱╱╱╲╱╲╲╲╲╲╱╱╱╱╱╲╲╱╲╲╲╲╱╱
╱╲╱╱╱╲╱╱╲╱╱╲╱╱╱╲╲╲╲╱╱╲╲╱╱╱╲╱╱╲╱╱╲╲╱╱╱╱╲╱╲╲╲╱╲╱╲╲╲╲
╲╲╲╱╱╲╲╲╲╱╲╲╲╲╲╱╱╱╲╱╲╲╱╲╲╱╱╱╱╲╱╲╱╲╲╱╱╱╱╱╱╲╲╲╲╱╲╱╲╱
╲╲╱╲╲╲╲╲╲╱╱╲╱╱╲╲╱╱╲╱╲╲╲╱╲╲╱╱╲╲╱╲╲╱╱╱╱╱╲╲╱╱╱╲╲╱╲╱╱╱
╲╱╱╱╲╱╱╲╲╲╱╲╲╲╱╱╱╲╱╲╱╲╲╱╲╱╱╲╲╲╲╱╲╱╱╱╱╲╱╲╱╱╲╱╱╱╱╱╲╲
╱╲╱╱╲╱╱╱╱╱╲╲╱╱╲╱╲╱╱╲╱╲╱╱╱╱╲╱╱╱╱╲╱╲╲╱╲╱╱╱╲╱╱╱╲╱╲╱╲╲
╲╱╱╱╲╱╱╲╲╱╱╱╱╱╱╲╱╱╱╱╲╱╲╱╲╲╲╲╲╲╲╲╲╱╲╲╲╲╱╱╱╱╱╱╲╲╱╲╱╲
╲╱╲╱╱╱╱╱╲╱╲╲╱╱╲╲╱╲╲╱╲╲╲╱╲╱╱╲╲╱╲╱╲╲╲╲╲╱╲╲╱╱╲╱╱╲╲╱╱╲
╲╲╲╱╲╲╱╲╲╲╲╱╲╲╱╲╱╲╲╲╱╱╱╱╲╲╲╲╱╲╱╱╱╱╱╲╲╱╲╱╲╱╲╱╱╱╱╱╲╱
╲╲╱╱╱╲╱╱╲╱╱╲╱╲╱╱╱╲╱╲╱╲╱╲╱╲╲╱╱╲╱╲╱╱╲╱╱╱╲╱╲╱╱╲╱╲╱╱╲╲
╲╱╲╲╲╱╱╱╲╲╲╱╱╱╲╱╱╱╲╲╱╲╱╲╱╱╲╱╱╲╲╱╱╱╱╱╱╱╲╲╲╱╱╲╲╱╱╱╱╲
╱╲╲╲╲╲╱╲╲╱╲╲╱╱╱╲╱╲╱╱╱╲╲╱╲╲╱╱╲╱╲╱╱╲╲╲╲╲╱╲╱╲╱╲╱╱╱╱╱╲
╲╱╲╲╲╱╱╱╱╱╲╱╱╲╱╱╲╲╱╲╱╱╲╱╱╱╲╱╱╲╲╱╱╲╱╲╱╱╱╲╲╲╱╲╲╲╱╱╱╲
╲╲╲╱╲╱╲╱╲╱╱╱╱╲╲╲╱╱╲╱╲╲╲╱╱╲╱╱╲╲╲╲╲╱╱╲╱╲╲╱╱╱╲╱╲╱╲╲╲╱

- Pattern 2

import random
characters = ["c", "o", "c", "o"]
width = 50
height = 25
line = ''

for y in range(height):
    for x in range(width):
        line += random.choice(characters)   #chose the letter randomly 
    if 'coco' in line :
        print(line.replace('coco','🥥🥥🥥🥥'))   #coconut emoji if it's combination of coco
    else :
        print(line)   #if not, just print the chosen letter 
    line = ''   #reset, change the line
ccccoocoocoocoooc🥥🥥🥥🥥ococ🥥🥥🥥🥥cooocoo🥥🥥🥥🥥ococcooooc
ooccooc🥥🥥🥥🥥occccccoooo🥥🥥🥥🥥c🥥🥥🥥🥥ccccoccooocc🥥🥥🥥🥥ccc
coocooooooccoccc🥥🥥🥥🥥occoccc🥥🥥🥥🥥ccoc🥥🥥🥥🥥cooccooccoc
🥥🥥🥥🥥o🥥🥥🥥🥥occ🥥🥥🥥🥥ooocoocooocc🥥🥥🥥🥥ccoocoocccccccoooo
coocoooccc🥥🥥🥥🥥ococcocc🥥🥥🥥🥥cooccoccccccocccoc🥥🥥🥥🥥cc
oocc🥥🥥🥥🥥coooocooooocooooccoc🥥🥥🥥🥥coocc🥥🥥🥥🥥oooo🥥🥥🥥🥥o
occoococc🥥🥥🥥🥥ccocccoo🥥🥥🥥🥥oocoocoo🥥🥥🥥🥥occoooooooooc
ccccoooo🥥🥥🥥🥥oooccooooccoc🥥🥥🥥🥥ooooccccc🥥🥥🥥🥥cocccooc
🥥🥥🥥🥥cccccocccocccoccoo🥥🥥🥥🥥oooo🥥🥥🥥🥥ccooococ🥥🥥🥥🥥occo
occoocccooo🥥🥥🥥🥥ooccoccoccoccoc🥥🥥🥥🥥occocccoc🥥🥥🥥🥥ooo
c🥥🥥🥥🥥coccooocoooccooc🥥🥥🥥🥥occcoooooc🥥🥥🥥🥥ocooooooooc
ooccooococcocccccoocoocc🥥🥥🥥🥥coccoocccooooocooocooo
oo🥥🥥🥥🥥oocooccoccoccoccccoococcocccc🥥🥥🥥🥥oocoocooocc
coooooc🥥🥥🥥🥥cooc🥥🥥🥥🥥🥥🥥🥥🥥coocooocoooocoococc🥥🥥🥥🥥ocoo
oooccooc🥥🥥🥥🥥cocc🥥🥥🥥🥥oo🥥🥥🥥🥥ccooocccccccoococ🥥🥥🥥🥥cco
cooo🥥🥥🥥🥥oococccoooocooccoocccocccc🥥🥥🥥🥥c🥥🥥🥥🥥ooc🥥🥥🥥🥥
cooooocooocccoocccccooocoooocoooccoocoooocoooocccc
occcccoccccccoo🥥🥥🥥🥥🥥🥥🥥🥥coccocccocc🥥🥥🥥🥥cooooocoococ
oo🥥🥥🥥🥥cocccoccoo🥥🥥🥥🥥oc🥥🥥🥥🥥oocoooccccoocoo🥥🥥🥥🥥cccoc
ooococccocccocccccoooocccc🥥🥥🥥🥥coocccooccccoocccooc
o🥥🥥🥥🥥🥥🥥🥥🥥cooccccocccooccoocooc🥥🥥🥥🥥ccoooccooocooooo
coccooocoocooooccooooccoooocc🥥🥥🥥🥥cocccc🥥🥥🥥🥥oococco
occ🥥🥥🥥🥥cooocccocccoccoooccccooo🥥🥥🥥🥥ococcoocccooooc
cooooocooccoo🥥🥥🥥🥥coccccooccoocooocooccoooocccooccc
ooccccocccooocoocccoccoocccoocoocooccccooc🥥🥥🥥🥥cccc


Read text to Python

- local text

# read() as one big string
filename = 'language.txt'
txt = open(filename, 'r').read() # w (for writing) rw (read and write)
print(txt)

- text with url, extract only the text from the etherpad -> url = 'https://pad.xpub.nl/p/archivefever/export/txt'

from urllib.request import urlopen


#for ATATA
url = 'https://pad.xpub.nl/p/ISSUE13_Atata_notes/export/txt'
response = urlopen(url)

lines = response.readlines()


#for OTHERNESS
url = 'https://pad.xpub.nl/p/Otherness_Daniel_L._Everett/export/txt'
response = urlopen(url)

liness = response.readlines()


#for OTHERNESS
url = 'https://pad.xpub.nl/p/Hope_Gurur_Ertem/export/txt'
response = urlopen(url)

linesss = response.readlines()


#extract "what" in each of 3 text
for line in lines:
    line = line.decode('UTF-8')
        
    if 'what' in line:
        print("found in ATATA, but where?")
        print(" --> " + line.replace('what', '*what*'))
        print()
        
        
for line in lines:
    line = line.decode('UTF-8')
        
    if 'what' in line:
        print("found in Otherness, but where?")
        print(" --> " + line.replace('what', '*what*'))
        print()
        
        
        
for line in lines:
    line = line.decode('UTF-8')
        
    if 'what' in line:
        print("found in Hope, but where?")
        print(" --> " + line.replace('what', '*what*'))
        print()


Prototyping 1 (30/09/2020)

JupiterLab

 Phython code

- add url : [marked word](https://www...)

- while (loop with condition ex.while True) or for -> for in for (with indentation! ) is nesting


Insert Image

- im.mode : RGB, RGBA(Red, Green, Blue, Alpha-for transparency), l(greyscale)

- im.thumbnail( (150, 150) ) : size automatically saved (to cancle, im.resize((100,100)) or restart from im = Image.open("b-.jpeg"))

- im.convert :not automatically saved. image pixelate key2.convert("1", dither=Image.NONE) or change the mode with key2.convert("l")

- urlopen image can be saved on server with key3.saved (also possible with terminal, saving locally)

- ASCII art : http://jwilk.net/software/python-aalib

from PIL import Image
import aalib
screen = aalib.AsciiScreen(width=100, height=50)

f = Image.open("b.jpeg") 
f = f.convert('L').resize(screen.virtual_size)
screen.put_image((0, 0), f)
print (screen.render())
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQWWB#W##W##W###WWWWQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQWB##XZZXZZZZZZZZUXZZUXXXXZ###WQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQWB#XXXXXXZXZXXZXZZZZXZZZZZZZUZZZZXZ#WWWW#ZXXZUWWQQQQQQQQQQQQQQQQQQQQQ
QQQQQQQQQQQQQQQQQQQQQQQQQQQQWBXXXXXXXXXX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o22oooo2oo2o22o2oo2oooooooononnnQQQQQQQQQQQWQQQWQQQ
QQQQQQQQQmvvvvvvvvvvvvnn1+ -......__.-{ooooooonnnnvnnnnnnonnnonnnonnnnnnnnnnvnnvdQWQQQQQQQQQQQQQQQQQ
QQQQQQQQWQzillllllllIvI}-.:.:.::=|nv>..+ooonnnvvvIvvvvvvvvvvvvvnvnvnvnvvnvvvnvvvmQQQQWQQQQQWQQQQQQQQ
QQQQQQQQQWm|iiiiiiilill> -.:.::.:-=--...vnnvvvIvlIllllllIvIvvIvIvvvvvvvvvvvvvvvqQQQQQQQQQQQQQQQQQQQQ
QQQQQQQQQWWaiiiiiiiiiii|...:-:.:.:..... vvvvvIIlllliliiliillillllllIIvIvvIvvvvnQWQQWQQQQQQQQQQQQQQQQ
QQQQQQQQQWQQp|ii|i|i||||=..-.--........%vIlIllliliiii||+|iiiiiiiiillllllllllInQWQQQQQQQQQQQWQQQQQQQQ
QQQQQQQQQQQWWma||i||||||+|.-........ _%lliliii|i|||=:::=||iiiiiiiiiiilillillnmWWQQQQQQQQQQQQQQQQQQQQ
QQQQQQQQQQWQQWWwc|||i|||+||==__.:__=iliiiii||||+=:-:.=+||||i|i|iiiiiiiiiiiiwWQQQQQQQQQQQWQQQQQQQQQWQ
QQQQQQQQQQQQWQWQQmo%|||||||||i|i|iiiii|ii||||=:::::=||+|||||i|i|i|i|iii|iimWWWQQQQQWQQQQQQQQQQQQQQQQ
QQQQQQQQQQQQQQQQWQQQgw%>|||||||||++||+||iis=-::;=||||+|||||||||i|||i|||ivvXXQWQWQWQQQQQQQQQQQQQQQQQQ
QQQQQQQQQQQQQQQQQQQWQWWQmwwa%|+||+|iI1nn1**i=||ii|||||||+||||||||||||ilIvvno2X$WQQQWQQQQQQQQQQWQQQQQ
QQQQQQQQQQQQQQQQQQQQQQQQWQWWQQ>:..=|+|||||||i|||||||||+|+|=|=|+|+|iivvviiIvnnoSX$WWQWQQQQWQQQQQQQQQQ
QQQQQQQQQQQQQQQQQQQQQQWQQQWBY(:.;==:==+++|+||||||||||+|++|+||||iilIvvvvi+iilvnno2XWWQQQQQQQQQQQQQQQQ
QQQQQQQQQQQQQQQQQWQQQWQQQWDvv;.=|||;;;====+++|+||||+|+|+||||||iillIvvvvv|=||lIvo22X$WQWQQQQQQQQQQQQQ
QQQQQQQQQQQQQQQQQQQQQQQQWW1nn>--<iI>==;;;====+++=+=|+|||||||iilllvvvvvnvl|+||lvnn2o2$WQQWQQQQQWQQQQQ
QQQQQQQQQQQQQQQQQQQQQQQQQW2vvi:=iiIi=====;===|+||||||||||iiilllvIvvvnnnvnv|+|iivvoS22WWQQQQQQQQQQQQQ
QQQQQQQQQQQQQQQQWQQQQQWQWQmci|:.=i|=|+i|+===|+||+||||iilvvvnnvnvnnnnvnnnnvl|+||IvnoS23WWWQQWQQQQQQQQ
QQQQQQQQQQQQQQQQQQQQQQQQQWWQga%i||iawoIi||+|+|||iilIvnnnooo22SSXXXXXo2oonovv=||iIvno2SXQQQQQQQQQQQQQ
QQQQQQQQQQQQQQQQQQQQQWQQQQQWWQQQQQQQQ#vii||||iivvnvnnnno22SS2SSXXXZZUZXXnonvi=+|lvvo2SXWWQQWQQQQQQQQ
QQQQQQQQQQQQQQQQQQQQQQQQWQQQQQWQQQQQWElIliiilvnnonnooo22S2S2XXXXXZZZZUZZX2nvl|+||lvnnonmQQWQQQQQQQWQ