This rst file is for testing the various Sphinx styles and class conversions that we'll find in a Sphinx rst file. Ideally we want to run through everything pretty often.
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
__author__ = 'SurpriseTRex' | |
def draw_constant(res=10): | |
"""Re-draws a Read node using Constant nodes as pixels.""" | |
# Checks that the user has selected a Read node. | |
try: | |
node = nuke.selectedNode() | |
except ValueError: |
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 argparse | |
def parse_args(): | |
parser = argparse.ArgumentParser() | |
# No trigger | |
parser.add_argument( | |
"no indent", | |
help="this isn't going to have an indent" | |
) |
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 docutils import nodes | |
from docutils.parsers.rst import directives, Directive | |
PARAGRAPH_CODE = """ | |
<div class="panel {panel_type}"> | |
<div class="panel-heading"> | |
<h3 class="panel-title">{panel_title}</h3> | |
</div> | |
<div class="panel-body"> | |
<p class="panel-text">{panel_content}</p> |
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
Sphinx: | |
Marked code is surrounded by <span class="hll"></span> | |
Octopress: | |
Marked code is surrounded by <span class="line marked"><span> | |
(Start lines have additional class of "start", end lines have "end" | |
Non-line numbered Code: |
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
#!/usr/bin/python | |
from re import search | |
ig_string = """ | |
1000Styles - http://instagram.com/1000styles | |
123 Klan - http://instagram.com/123klan | |
Aa - http://instagram.com/aestheticapparatus | |
Aaron Martin (Angrywoebots) - http://instagram.com/woes | |
Aec (Interesni Kazki) - http://instagram.com/aec_interesnikazki | |
Andrews, Esao - http://instagram.com/esao |
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
#!/usr/bin/python | |
"""Script used to read a quiz results CSV and grade, then select winners.""" | |
#============================================================================== | |
# IMPORTS | |
#============================================================================== | |
import csv | |
from datetime import datetime | |
import random |
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
Alethkar:expanse sean$ ls | |
expanse.py expanse_responses.csv | |
Alethkar:expanse sean$ python expanse.py expanse_responses.csv | |
Invalid entry: Shidarin is not allowed to enter. | |
Invalid entry: User HwoThumb is not over 18! | |
Invalid entry: User Cannessian has entered more than once! Only the first will be counted. | |
Invalid entry: User Cannessian has entered more than once! Only the first will be counted. | |
Invalid entry: User Cannessian has entered more than once! Only the first will be counted. | |
Invalid entry: Shidarin is not allowed to enter. |
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
#!/usr/bin/python | |
"""This script will create an m3u file with a tracklist of each .cue or .ccd | |
found in a subdirectory, then name the m3u after the subdirectory. This helps | |
with multiple disks for emulation. | |
""" | |
import os | |
import os.path |
Need to add Python’s bin folder to Window’s $PATH, otherwise it can’t run installers correctly.
- Windows Button + Pause Button (AKA Break Button, AKA F15)
- Click Advanced Settings
- Click Environment Variables
- Append
;C:\python27;C:\python27\Scripts
to the Path Variable
OlderNewer