This file contains hidden or 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/env python | |
import Tkinter as tk | |
class AlignTest(tk.Frame): | |
def __init__(self, parent): | |
tk.Frame.__init__(self, parent) | |
self.parent = parent | |
self.grid() | |
self.parent.title('Align test') |
This file contains hidden or 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 arcpy | |
import arcpy as ap | |
# Load the reference to the current map document. | |
# Caveat: not sure it will work if the toolbox is running in background. | |
# This is because background execution is performed within a separate | |
# kernel. | |
mxd = ap.mapping.MapDocument("CURRENT") # (mxd_path) | |
# Get list of dataframes. There might be more than one dataframe in a map |
This file contains hidden or 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/env python | |
# A script to graph the statistics of a set of IP blacklists generated by your favorite | |
# firewall program as long as the lists consist of a series of IP addresses one for each | |
# line. | |
import re | |
import sys | |
import json | |
import urllib2 | |
import scoket |
This file contains hidden or 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
#buttons { | |
display: inline-block; | |
text-decoration: none; | |
height: 100px; | |
width: 90%; | |
text-align: justify; | |
padding-left: 5%; | |
padding-right: 5%; | |
} |
This file contains hidden or 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 ctypes | |
class Toolbox(object): | |
def __init__(self): | |
self.label = "popup message dev" | |
self.alias = "pupMesg_dev" | |
self.tools = [PopupMessage] | |
This file contains hidden or 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 Tkinter as tk | |
import matplotlib | |
from numpy import arange, sin, pi | |
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg | |
from matplotlib.figure import Figure | |
class Toolbox(object): | |
def __init__(self): | |
self.label = "test plotting dev" |
This file contains hidden or 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/env python | |
# A script to graph the statistics of a set of IP blacklists generated by your favorite | |
# firewall program as long as the lists consist of a series of IP addresses one for each | |
# line. | |
import re | |
import sys | |
import json | |
import urllib2 | |
import socket |
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 hidden or 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
(* | |
* Apple script to create a new file/folder based on the current selection in Finder: | |
* - if there is nothing selected, it will create the file/folder in the currently displayed folder | |
* - if a file is selected, it will create the file/folde in the folder of the selected file | |
* - if a folder is selected, it will create the file/folder in the selected folder | |
* - if an application is selected, it will not create the file/folder | |
* | |
* Notes: | |
* - By default it creates files named "untitled.txt". | |
* - Pressing "shift" will prompt the user for the file name |
This file contains hidden or 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 re | |
import time | |
import subprocess as sbpr | |
import datetime as dt | |
HOST = 'google.com' | |
DELAY_MS = 1000 | |
while(True): | |
t = float(re.findall(r'time=(.*) ms',sbpr.check_output(['ping', '-c', '1', HOST]).decode('ascii'))[0]) |