Skip to content

Instantly share code, notes, and snippets.

View FrankFonts's full-sized avatar
🏠
Working from home

Frank Fonts FrankFonts

🏠
Working from home
View GitHub Profile
# design settings
gutter = 60
radius = 6
pageW = 1600
# draw filled outline or contours
contour = False
# draw nodes and bluezones and vertical metrics?
@FrankFonts
FrankFonts / Path in Python
Created April 22, 2015 14:18
Path in Python
import os
print("Path at terminal when executing this file")
print(os.getcwd() + "\n")
print("This file path, relative to os.getcwd()")
print(__file__ + "\n")
print("This file full path (following symlinks)")
full_path = os.path.realpath(__file__)
@FrankFonts
FrankFonts / Command Line Arguments
Created April 22, 2015 11:34
Command Line Arguments
#!/usr/bin/python
import sys
# it's easy to print this list of course:
print sys.argv
# or it can be iterated via a for loop:
for i in range(len(sys.argv)):
@FrankFonts
FrankFonts / Context Aware Delimiter_030.py
Created April 14, 2015 20:21
Context Aware Delimiter_030.py
dict={
'cap' : 'A B C D E F G H I J K L M N O P Q R S T U V W X Y Z'.split(' '),
'lowercase' : 'a b c d e f g h i j k l m n o p q r s t u v w x y z'.split(' ')
}
def find(this, dictionary):
for key in dictionary.keys():
if this in dictionary[key]:
return key