Skip to content

Instantly share code, notes, and snippets.

View OlyDLG's full-sized avatar

David L. Goldsmith OlyDLG

View GitHub Profile
@OlyDLG
OlyDLG / appInternals.py
Created April 14, 2015 20:13
Demo of Q re: how to access something after runTouchApp() has been called
from kivy.app import App
from kivy.uix.screenmanager import Screen, ScreenManager
from kivy.garden.graph import Graph
class appInternalsScreen(Screen):
def __init__(self, **kwargs):
super(appInternalsScreen, self).__init__(**kwargs)
G = Graph(x_grid_label=True, y_grid_label=True,
x_ticks_major = 10, y_ticks_major = 10)
@OlyDLG
OlyDLG / ArchiveSourceWithOutput.py
Last active January 18, 2017 07:42
Function to write the contents, suitably encoded, of a text file, e.g., a Python source file, into an extended attribute of a target file
# ArchiveSourceWithOutput.py
#
# Copyright 2017 by David Lawrence Goldsmith
# License: BSD
# Use at own risk; no warranty expressed or implied
#
# Two functions--encode_and_write and read_and_decode--to assist in,
# among other potential uses, matching source code with output files,
# (on platforms that support extended attributes via the xattr shell
# command, e.g., Mac and some posix flavors):
@OlyDLG
OlyDLG / PushData.m
Created February 21, 2017 22:18
Samples of Code--Python and MatLab--written for WA St. Dept. of Ecology, 2010-2013
function success = PushData(files, EN_recip, DB, subfuncAccess)
%{
Note: For "code-sample" purposes only; WILL NOT RUN AS IS;
Anything in <> represents REDACTED identifying information
PushData: Push telemetered moorings data into EAPMW
Inputs: (all are optional, though if a latter one is supplied, then the
previous ones must be also)
/* Base Classes for DLGsMTG
__author__ = 'David Lawrence Goldsmith'
__copyright__ = 2017
__license__ = 'BSD'
__warranty__ = None
__all__ = ('Card', # object representing a single card
'Library' # a deque of cards
'CardSet' # an unordered_set of cards