This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2023 The MediaPipe Authors. All Rights Reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sketch | Prototype | |
---|---|---|
Invite | Attend | |
Suggest | Describe | |
Explore | Refine | |
Question | Answer | |
Propose | Test | |
Provoke | Resolve | |
Tentative, non committal | Specific Depiction |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A (conventional design) | B (Dunne & Raby) | C (ritical prototyping) | |
---|---|---|---|
Affirmative | Critical | Propositional | |
Problem solving | Problem finding | Problem setting | |
Provides answers | Asks questions | Discovers questions | |
Design for production | Design for debate | Design for inquiry | |
Design as solution | Design as medium | Design as practice | |
In the service of industry | In the service of society | In the service of design | |
Fictional functions | Functional fictions | Exploratory fictions | |
For how the world is | For how the world could be | What is the world? | |
Change the world to suit us | Change us to suit the world | Change design to suit a context |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bs4 import BeautifulSoup | |
import requests | |
# Open and read the template file | |
fo = open("template.html", "r") | |
html_template = fo.read(); | |
fo.close() | |
# get the webpage | |
r = requests.get("http://www.nytimes.com") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>My Scraped NYT Page</title> | |
</head> | |
<body> | |
<p class="title"><b>The Scraped Data from NYT</b></p> | |
<p>{0}</p> | |
<img src="{1}"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bs4 import BeautifulSoup | |
import requests | |
# get the webpage | |
r = requests.get("http://www.nytimes.com") | |
# get the HTML source from that page | |
html_doc = r.text | |
# turn the source into a bs4 "soup" object |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# these examples assume that the bs4_example.py code has already been run | |
# https://gist.github.com/pvanallen/0e07e3d24c9885f30d45a2b515a18600#file-bs4_example-py | |
# | |
# paste each of these lines, one at a time, into the python command line | |
# to see the result | |
soup.title | |
# 1 | |
# <title>The Dormouse's story</title> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bs4 import BeautifulSoup | |
html_doc = """ | |
<html><head><title>The Dormouse's story</title></head> | |
<body> | |
<p class="title"><b>The Dormouse's story</b></p> | |
<p class="story">Once upon a time there were three little sisters; and their names were | |
<a href="http://example.com/elsie" class="sister" id="link1">Elsie</a>, | |
<a href="http://example.com/lacie" class="sister" id="link2">Lacie</a> and |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
adjectives = ["angry","bewildered","clumsy","defeated","embarrassed","fierce","grumpy","helpless","itchy","jealous","lazy","mysterious","nervous","obnoxious","panicky","repulsive","scary","thoughtless","uptight","worried","agreeable","brave","calm","delightful","eager","faithful","gentle","happy","jolly","kind","lively","nice","obedient","proud","relieved","silly","thankful","victorious","witty","zealous"] | |
verbs = ["add","allow","bake","bang","call","chase","damage","drop","end","escape","fasten","fix","gather","grab","hang","hug","imagine","itch","jog","jump","kick","knit","land","lock","march","mix","name","notice","obey","open","pass","promise","question","reach","rinse","scatter","stay","talk","turn","untie","use","vanish","visit","walk","work","yawn","yell","zip","zoom"] | |
nouns = ["apple","arm","banana","bike","bird","book","chin","clam","class","clover","club","corn","crayon","crow","crown","crowd","crib","desk","dime","dirt","dress","fang ","field","flag","flower","fog","game","heat","hil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Make a sentence</title> | |
</head> | |
<body> | |
<p class="title"><b>The new sentence</b></p> | |
<p>{0} is a {1} {2} that can {3} a {4}</p> | |
</body> |
NewerOlder