Cookbook: Difference between revisions

From XPUB & Lens-Based wiki
m (moved CookBook to Cookbook: moving away from camel case)
 
(121 intermediate revisions by 23 users not shown)
Line 1: Line 1:
= The NMM CookBook =
See also the [[:Category:Cookbook]]
 
 
 
A programming Cookbook, like the culinary original, is a collection of "recipes" or scripts that are often useful, or which represent a pattern that comes close to design problems that frequently occur. The Networked Media Cookbook reflects the particular design problems faced by the research and projects that occur here. If you would like to contribute your recipe, feel free, and consider checking the [[StyleGuide | style guide]].


== Audio ==
== Audio ==
* [[SimpleAlgorithmicSequencing | Simple algorithmic sequencing]] - Python
* [[SimpleAlgorithmicSequencing | Simple algorithmic sequencing]] - Python
* [[Sox | Manipulating audio from the command-line with sox]] - Shell
* [[Sox]] - Shell
* [[UsingAMicrophoneAsASensor | Using a microphone as a sensor]] - Python
* [[UsingAMicrophoneAsASensor | Using a microphone as a sensor]] - Python
* [[NetArtRadio | Net-Art Radio]] - Shell
* [[NetArtRadio | Net-Art Radio]] - Shell
* [[ffmpegandAudio | ffmpeg and audio (transcoding and metadata)]] - Shell
* [[Jack | Run jack on Linux install]] - Linux
* [[Festival]] - Text to Speech
* [[Speech recognition]] - PyAudio, Python, Pocketsphinx
* [[FMtoTEXT]] - Linux, SpeechRegognition, pyaudio, pyrtlsdr, Python
* [[Pyaudio play wav file]] - Use python with PyAudio library to playback audio
* [[Icecast|Audio Streaming Online]]- icecast, ices, linux


== Database ==
== Database ==
Line 22: Line 25:
* [[NetworkTheorySpamMachine | Network Theory Spam Machine]] - Shell
* [[NetworkTheorySpamMachine | Network Theory Spam Machine]] - Shell
* [[RandomEmailSpamMachine | Random Email Spam Machine]] - Shell
* [[RandomEmailSpamMachine | Random Email Spam Machine]] - Shell
* [[IMAPReadEmail | IMAP Access to Email Account ]] - Python


== Files ==
== Files ==
Line 27: Line 31:
* [[ReadingFromABinaryFile | Reading from a binary file]] - Python
* [[ReadingFromABinaryFile | Reading from a binary file]] - Python
* [[ZeroPadding | Zero-padding names]]
* [[ZeroPadding | Zero-padding names]]
== Food ==
* [[Peasoup with mint | Peasoup with mint]] - Soup


== Hardware setup ==
== Hardware setup ==
Line 34: Line 41:
* [[CLIIntroImageMagick | A introduction to the command-line using ImageMagick]]
* [[CLIIntroImageMagick | A introduction to the command-line using ImageMagick]]
* [[ImageMagick | Manipulating images from the command-line with ImageMagick]]
* [[ImageMagick | Manipulating images from the command-line with ImageMagick]]
* [[DIT-fanzine | More ImageMagick-tricks from DIT-Fanzine workshop]] - Python + Bash
* [[ePubIMG | Generating an ePub filled with images]] - Python
* [[ePubIMG | Generating an ePub filled with images]] - Python
* [[PythonGraphviz | Drawing graphs with Python + PyGraphViz]]
* [[PythonGraphviz | Drawing graphs with Python + PyGraphViz]]
* [[User:Silviolorusso/mipsum | "Lorem ipsum" for learning while practicing]] Inkscape + Python
* [[Extracting Pixel Data with ImageMagick | Extracting Pixel Data with ImageMagick]]


== Lists ==
== Lists ==
* [[ListBasics | Working with lists in Python]] - Python
* [[ListBasics | Working with lists in Python]] - Python
== Maths ==
* [[GetDistanceBetweenPoints2D | Calculate the distance between 2 points on two axis - XY]]
* [[GetDistanceBetweenPoints3D | Calculate the distance between 3 points on three axis - XYZ]]
* [[MoveTowardsPoint2D | Move from one point to another point on two axis - XY]]
== Networking ==
* [[Syncthing]] - share folders with
* [[Netcat Chat]] - shell, netcat
* [[Get some HTTP content without a browser]] - Shell, netcat
* [[Tunnel your HTTP traffic with ssh]] - Shell, SSH, SOCKS
* [[Sniff HTTP traffic on your machine]] - Shell, dsniff
* [[Wrap network traffic of almost any application with a SOCKS proxy]] - Shell, Dante, SOCKS
* [[find my pi on the local network]] - Shell
* [[Rqlite|Distributed database, Rqlite]] - Rqlite, Linux, Pi
== Networking: SSH ==
* [[SSH]] - what you always wanted to know, but were afraid to ask about SSH
* [[Creating, using and managing ssh keys]] - shell, ssh, keyring
* [[Sshfs|sshfs]] - mount remote directories over an SSH to your local machine
* [[Reverse ssh tunnel]] - a poor man's VPN, or the way to access a local machine, without a public IP
==Networking: webserver ==
* [[Public html directories for users]]


== Operating Systems ==
== Operating Systems ==
* [[LaunchdAutostart | Starting a daemon or agent on OSX boot/login]] - Property List, Shell
* [[LaunchdAutostart | Starting a daemon or agent on OSX boot/login]] - Property List, Shell
* [[DjangoVirtualbox | Running a Django dev environment from VirtualBox]] - !VirtualBox, Python, GNU/Linux
* [[DjangoVirtualbox | Running a Django dev environment from VirtualBox]] - !VirtualBox, Python, GNU/Linux
* [[Install_Linux_shell_on_Windows_10 | Running the Linux shell on Windows 10]] - Shell, Windows, Windows subsystem for Linux
* [[Install Day| Some notes on the install day.]]
* [[Create a new user account on your GNU/Linux machine]] - Shell
* [[SoftwareSnapshot| Script to create a snapshot of all installed packages in order to re-install on a new machine or after new OS install]]
* [[Install OS X on external drive]] - Mac OS X, OS X Installer, USB, external devices
* [[Install rEFInd boot manager]] - Apple, OS X, EFI, rEFIt, rEFInd, boot manager
* [[Install Linux on PZI iMacs]] - Linux Debian on the PZI iMacs (the new devices, 2015)
* [[Floppies write]] - in Linux
* [[Install Linux along with Windows]]- Linux, Windows, DualBoot
==Raspberry Pi==
* [[The Ultimate RPi Installation Guide]]
* [[Clone_RPi]] clone a Raspberry Pi system to an image file
* [[PiCam]] - using a camera in a Pi
* [[RaspberryPi GPIO]] - Set up and Test Pi's GPIO 
** [[Pi GPIO PWD LED]] Control LED brightness with Raspberry Pi + Python
** [[Pi_skin_conductivity]] Raspberry Pi's GPIO as skin conductivity sensors
** [[PI LED strips]] - Control LED strips with a Pi
* [[Tinc|Tinc in pi]]
* [[https://pzwiki.wdka.nl/mediadesign/Prototypology/Adapterology-1 | How to connect a analog monitor to an Raspberry Pi 4? ]]


== Print ==
== Print ==
* [[CommandLinePageLayout | Command-line page layout]]
* [[CommandLinePageLayout | Command-line page layout]]
* [[Weasyprint|Weasyprint: HTML & CSS To print]]
* [[Imposition|Page Impositions with Imagemagick]]
* [[Mini zine collator|collating/imposing a one-sheet mini zine layout]]
* [[Pandoc]]
* [[ICML]] structured content in inDesign + designing using styles
* [[Pen plotters]]
== Arduino ==
* [[2008_3.05 | Pyserial]] - Python
== Python ==
* [[Python Virtual Envs]]
* [[Python data-types]]
* [[Python Subprocess]]
* [[JSON in Python]]
* [[Jinja]] - templating engine
* [[diffs in Python]] - interpreting [[http://en.wikipedia.org/wiki/Diff_utility diffs]] between files or string in Python
* [[frames2movie]]
* [[Flask]]
* [[PythonImageLibrary]]
==Shell==
* [[Shell Cheat Sheet]]
* [[Shell Scripting]]
* Unix shell on Windows with [[Cygwin]]
* [[jq|jq]] Command line JSON processor
== Games ==
* [[Pygame]] - Python
==Unix==
* [[UNIX]]
* [[UNIX_basics]]
== Version Control ==
* [[Configuring Git]] - git
* [[Working with Git branches]]


== Video ==
== Video ==
Line 51: Line 143:
* [[CompressingFLV | Compressing FLV videos with ffmpeg]]
* [[CompressingFLV | Compressing FLV videos with ffmpeg]]
* [[FFMpeg]]
* [[FFMpeg]]
== Text ==
== Text ==
* [[Unicode | Working with special characters: Unicode]] - Python
* [[Unicode | Working with special characters: Unicode]] - Python
* [[ePubChapters | Generating the chapters of an ePub using a couple of HTML files]] - Python
* [[ePubChapters | Generating the chapters of an ePub using a couple of HTML files]] - Python
* [[PythonRegEx | Using regular expressions in Python]]
* [[PythonRegEx |Regex]] -  Python
* [[Manipulate XMLs using XPath]] - Python, lxml, XPath
* [[Simplifying HTML by removing "invisible" parts]] - Python, lxml
* [[Stripping all the tags from HTML to get pure text]] - Python, nltk
* [[Looking up synonym-sets for a word]] - Python, wordnet
* [[Splitting text into sentences]] - Python, nltk
* [[Removing common words / stopwords]] - Python, nltk
* [[Finding capitalized words]] - Python, regex
* [[Turning a text in an alphabetical list of unique words]] - Python
* [[Displaying a list of words from a text followed by the number of times they appear]] - Python
 
== OCR ==
* [[Character recognition - from pdf to txt]] - Shell
* [[Install Tesseract 4.0-Ubuntu|Install Tesseract 4.0 and training tools- Ubuntu]]


== Web ==
== Web ==
* [[Simple CGI Script in Python]]
* [[EscapingSpecialHTMLCharacters | Escaping special HTML characters]] - Python
* [[EscapingSpecialHTMLCharacters | Escaping special HTML characters]] - Python
* [[CreatingAndWorkingWithURLs | Creating and working with URLs]] - Python
* [[CreatingAndWorkingWithURLs | Creating and working with URLs]] - Python
Line 64: Line 172:
* [[PythonTwitter | Reading data from Twitter]] - Python
* [[PythonTwitter | Reading data from Twitter]] - Python
* [[PythonHtml5lib | Scraping a web page (using html5lib & "the dom")]] - Python
* [[PythonHtml5lib | Scraping a web page (using html5lib & "the dom")]] - Python
* [[JQueryBasics]]
* [[JQuery]]
* [[RSSFeedTime | From the beginning of time... / Performing an RSS feed with time]]
* [[RSSFeedTime | From the beginning of time... / Performing an RSS feed with time]]
* [[PythonFlickrImageFeed | Downloading images from a Flickr RSS search feed]]
* [[PythonFlickrImageFeed | Downloading images from a Flickr RSS search feed]]
* [[NewDjangoProject | Creating a new Django application from scratch]]
* [[NewDjangoProject | Creating a new Django application from scratch]]
* [[Follow and download user's favorites photos on Flickr]] Python, flickrapi, spider
* [[JSON parsing from an API and do something with it]] - JSON, Python, API
* [[Extracting parts of an HTML document]] - Python
* [[Extracting the text contents of a node]] - Python, lxml
* [[Turning part of a page back into code (aka serialization)]] - Python, lxml
* [[Displaying the titles of an RSS feed]] - Python
* [[User:Jonas Lund/jQueryAjax | How to do Simple Ajax Request with jQuery]]
* [[Mastodon-api|Posting text and image to Mastodon]]
* [[Make Cookies]]- Javascript


== Agenda ==
== Agenda ==
Line 80: Line 197:
* [[TeensyUSBMIDI | Teensy USB MIDI device code]]
* [[TeensyUSBMIDI | Teensy USB MIDI device code]]
* [[PiezoPreamp | Piezo-disc preamplifier circuit]]
* [[PiezoPreamp | Piezo-disc preamplifier circuit]]
=== Electronics Shopping ===
Where to buy electronics parts & other stuff
* In Rotterdam:
** [http://www.dil.nl/ DIL electronica] in the Jan Lightartstraat, nr 59, behind the Ikazia hospital near Zuidplein
** [http://www.ibsrotterdam.nl/ International Bearing Services] sell all kinds of ball-bearings and other mechanical stuff
** [http://www.troost-rotterdam.nl/ Troost Aandrijftechniek] bearings and wheels and other mechanical stuff
** [http://eriks.nl/ Eriks] also mechanical bits, gears, etc.
* On-Line:
** [http://www.pieterfloris.nl/ Pieter Floris] sells Arduini, sensors, displays and other cool stuff
** [https://www.iprototype.nl/ iPrototype] sells Arduini and such
** [http://www.sparkfun.com/ Sparkfun] sell lots of Arduini and other kits. They have their own design-team who make cool gadgets etc. However, they are in the U.S., so you will need a credit-card to buy stuff from Sparkfun, and shipping takes a while...
** [http://nl.farnell.com/ Farnell] Wholesale Electronics. If you need a part and can't find it anywhere else, look here. However, you need to ba a business and have an account with them before you can order stuff. If you REALLY need something from Farnell, let me (Stock) know and i can order it for you.


== Other ==
== Other ==
* [[HumanComputation | Performing Addition with People]]
* [[HumanComputation | Performing Addition with People]]


== External (Still to be incorporated in this wiki) ==
== To be categorized ==
* [[BeautifulSoup]]
* [[BeautifulSoup]]
* http://automatist.net/techdaze/BASH - Has several subpages, actually this content needs to be made specific to NMM -- right now it's too much yet-another-guide to BASH.
* [[BASH]] - Has several subpages, actually this content needs to be made specific to NMM -- right now it's too much yet-another-guide to BASH.
* http://automatist.net/techdaze/CompilingOpenSourceSoftware Needs to be rewritten, expanded to a larger Cookbook section on Getting new (open source) software...
* [[CompilingOpenSourceSoftware]] Needs to be rewritten, expanded to a larger Cookbook section on Getting new (open source) software...
* http://automatist.net/techdaze/Algorithmic_Media - this needs to get split into various examples of "generating images, audio, and video"
* [[Algorithmic Media]] needs to get split into various examples of "generating images, audio, and video"
* http://automatist.net/techdaze/Audio_Cutup_PD_Patch (images missing)
* [[Audio Cutup PD Patch]] (images missing)
* http://automatist.net/techdaze/ClassyTurtles (Example of using Classes to Implement Turtle Graphics with the PIL)
* [[ClassyTurtles]] (Example of using Classes to Implement Turtle Graphics with the PIL)
* [[Transforming a list of data in Python]]
 
== Bike ==
** [https://pzwiki.wdka.nl/mediadesign/Bikerepair#Repair_Shops Bike Repair]

Latest revision as of 13:48, 29 September 2023

See also the Category:Cookbook

Audio

Database

Django

Email

Files

Food

Hardware setup

Image

Lists

Maths

Networking

Networking: SSH

Networking: webserver

Operating Systems


Raspberry Pi

Print

Arduino

Python

Shell

Games

Unix

Version Control

Video

Text

OCR

Web

Agenda

Electronics & Hardware

Electronics Shopping

Where to buy electronics parts & other stuff

  • In Rotterdam:
  • On-Line:
    • Pieter Floris sells Arduini, sensors, displays and other cool stuff
    • iPrototype sells Arduini and such
    • Sparkfun sell lots of Arduini and other kits. They have their own design-team who make cool gadgets etc. However, they are in the U.S., so you will need a credit-card to buy stuff from Sparkfun, and shipping takes a while...
    • Farnell Wholesale Electronics. If you need a part and can't find it anywhere else, look here. However, you need to ba a business and have an account with them before you can order stuff. If you REALLY need something from Farnell, let me (Stock) know and i can order it for you.

Other

To be categorized

Bike