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 os | |
def createHardLink(src, dst): | |
import ctypes | |
if not ctypes.windll.kernel32.createHardLinkA(dst, src, 0): raise OSError | |
os.link = createHardLink |
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
""" | |
pip-install.py | |
A pure python script to download and install the distribute_setup and | |
pip utilities | |
Adapted from: | |
http://stackoverflow.com/questions/4750806/how-to-install-pip-on-windows/15294806#15294806 | |
http://stackoverflow.com/questions/2792650/python3-error-import-error-no-module-name-urllib | |
http://stackoverflow.com/questions/1093322/how-do-i-check-what-version-of-python-is-running-my-script |
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 requests | |
import json | |
description = "published from Leo" # todo: derive from docstring, if present, otherwise 1st para | |
public = True | |
filename = p.h # node headline | |
content = p.b # node body | |
api_url = 'https://api.github.com/gists' |
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
<?xml version="1.0" encoding="utf-8"?> | |
<!-- Created by Leo (http://webpages.charter.net/edreamleo/front.html) --> | |
<?xml-stylesheet ekr_test?> | |
<leo_file xmlns:leo="http://www.leo-editor.org/2011/leo" > | |
<leo_header file_format="2"/> | |
<vnodes> | |
<v t="maphew.20130607222534.1739" a="E"><vh>@button Run Elevated</vh> | |
<v t="maphew.20130608014320.1983"><vh>docstring</vh></v> | |
<v t="maphew.20130608014320.1743"><vh>imports</vh></v> | |
<v t="maphew.20130608014320.1744"><vh>Leo preparation</vh></v> |
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
<?xml version="1.0" encoding="utf-8"?> | |
<!-- Created by Leo (http://webpages.charter.net/edreamleo/front.html) --> | |
<?xml-stylesheet ekr_test?> | |
<leo_file xmlns:leo="http://www.leo-editor.org/2011/leo" > | |
<leo_header file_format="2"/> | |
<vnodes> | |
<v t="maphew.20130608014320.1741"><vh>Run Elevated test</vh></v> | |
</vnodes> | |
<tnodes> | |
<t tx="maphew.20130608014320.1741">import os, sys |
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
<?xml version="1.0" encoding="utf-8"?> | |
<!-- Created by Leo (http://leoeditor.com/leo_toc.html) --> | |
<?xml-stylesheet ekr_test?> | |
<leo_file xmlns:leo="http://www.leo-editor.org/2011/leo" > | |
<leo_header file_format="2" tnodes="0" max_tnode_index="0" clone_windows="0"/> | |
<globals body_outline_ratio="0.5" body_secondary_ratio="0.5"> | |
<global_window_position top="50" left="50" height="500" width="700"/> | |
<global_log_window_position top="0" left="0" height="0" width="0"/> | |
</globals> | |
<preferences/> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
; 2014-Feb-27: as seen at http://www.autohotkey.com/board/topic/102227-gmailkeys-for-outlook-2013/ | |
;******************************************************************************* | |
; Information | |
;******************************************************************************* | |
; AutoHotkey Version: 3.x | |
; Language: English | |
; Platform: XP/Vista/7 | |
; Updated by: Toby Garcia | |
; Previously updated by: Ty Myrick |
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
<?xml version="1.0" encoding="utf-8"?> | |
<!-- Created by Leo: http://leoeditor.com/leo_toc.html --> | |
<?xml-stylesheet ekr_test?> | |
<leo_file xmlns:leo="http://leoeditor.com/namespaces/leo-python-editor/1.1" > | |
<leo_header file_format="2" tnodes="0" max_tnode_index="0" clone_windows="0"/> | |
<globals body_outline_ratio="0.5" body_secondary_ratio="0.5"> | |
<global_window_position top="50" left="50" height="500" width="700"/> | |
<global_log_window_position top="0" left="0" height="0" width="0"/> | |
</globals> | |
<preferences/> |
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 sys | |
debug = True | |
def exceptionHandler(exception_type, exception, traceback, debug_hook=sys.excepthook): | |
'''Print user friendly error messages normally, full traceback if DEBUG on. | |
Adapted from http://stackoverflow.com/questions/27674602/hide-traceback-unless-a-debug-flag-is-set | |
''' | |
if debug: | |
print '\n*** Error:' | |
# raise |
OlderNewer