Digital and analog television standards resolution reference.
| Standard | Resolution (dots × lines) | DAR (H:V) | Pixels |
|---|---|---|---|
| PixelVision | 120 × 90 | 4:3 | 10,800 |
| """ | |
| Url: https://gist.github.com/wassname/1393c4a57cfcbf03641dbc31886123b8 | |
| """ | |
| import unicodedata | |
| import string | |
| valid_filename_chars = "-_.() %s%s" % (string.ascii_letters, string.digits) | |
| char_limit = 255 | |
| def clean_filename(filename, whitelist=valid_filename_chars, replace=' '): |
| --[[ deepcopy.lua | |
| Changes in this fork | |
| ==================== | |
| - Added support for table.unpack (Lua 5.2+) | |
| Deep-copy function for Lua - v0.2 | |
| ============================== | |
| - Does not overflow the stack. | |
| - Maintains cyclic-references |
| using UnityEngine; | |
| using System.Collections; | |
| // source: http://diaryofagraphicsprogrammer.blogspot.fi/2009/10/bitmasks-packing-data-into-fp-render.html | |
| public class PackTest : MonoBehaviour { | |
| void Start () { |
| import sys; from PIL import Image; import numpy as np | |
| chars = np.asarray(list(' .,:;irsXA253hMHGS#9B&@')) | |
| if len(sys.argv) != 4: print( 'Usage: ./asciinator.py image scale factor' ); sys.exit() | |
| f, SC, GCF, WCF = sys.argv[1], float(sys.argv[2]), float(sys.argv[3]), 7/4 | |
| img = Image.open(f) | |
| S = ( round(img.size[0]*SC*WCF), round(img.size[1]*SC) ) | |
| img = np.sum( np.asarray( img.resize(S) ), axis=2) |
| // Just before switching jobs: | |
| // Add one of these. | |
| // Preferably into the same commit where you do a large merge. | |
| // | |
| // This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
| // and then it quickly escalated into more and more evil suggestions. | |
| // I've tried to capture interesting suggestions here. | |
| // | |
| // Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
| // @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |