Skip to content

Instantly share code, notes, and snippets.


Michael Meisinger mmeisinger

View GitHub Profile
mmeisinger / README.txt
Last active Jan 28, 2016
File upload to AgXchange
View README.txt
Script to upload files to AgXchange(tm).
mmeisinger / gist:fb68f0d7dd02709fd809
Created Sep 24, 2014
Thingworx install on Ubuntu 14.04.1 VM
View gist:fb68f0d7dd02709fd809
VirtualBox VM Install
- VirtualBox installed
- Ubuntu ISO image downloaded: ubuntu-14.04.1-server-amd64.iso
-- for 64bit architecture AMD/Intel processors
- Thingworx packages downloaded
Create new VM in VirtualBox, select ISO and use these (or other) settings:
View gist:fc73be7c5f46f979e92a
def get_user_events(nr_list, start_time):
dq = DatastoreQueryBuilder(datastore=DataStore.DS_EVENTS, profile=DataStore.DS_PROFILE.EVENTS)
where_list = []
for nr in user_nr_list:
nr_condition_and = []
if nr.origin:
nr_condition_and.append(qb.eq(qb.EA_ORIGIN, nr.origin)
if nr.origin_type:
nr_condition_and.append(qb.eq(qb.EA_ORIGIN_TYPE, nr.origin_type)
if nr.event_type:
mmeisinger /
Last active Aug 29, 2015
Advanced events query
from pyon.datastore.datastore import DataStore
from pyon.datastore.datastore_query import DatastoreQueryBuilder, DQ
from pyon.public import get_ion_ts_millis
dqb = DatastoreQueryBuilder(datastore=DataStore.DS_EVENTS, profile=DataStore.DS_PROFILE.EVENTS)
filter_origins = dqb.in_(DQ.EA_ORIGIN, "7b1c97e40b7345b5b31a6d3208a39040", "234d1d999adc490f90b1406c14a9591a")
filter_types = dqb.in_(DQ.ATT_TYPE, "ResourceLifecycleEvent", "ResourceModifiedEvent")
filter_mindate = dqb.gte(DQ.RA_TS_CREATED, str(get_ion_ts_millis()-1000*60*60)) # 1 hour back in this case
where = dqb.and_(filter_origins, filter_types, filter_mindate)
View objects:data:sa:marine_asset.yml
# Holds information about the definition of a custom attribute, e.g. for instrument models
# Name of the attribute
name: ""
# Type of the attribute.
# Codelist: str, int, float, bool, list, dict
type: ""
# Description for the attribute
description: ""
# Default value for the attribute
View supervisord.conf
; Sample supervisor config file.
file=/tmp/supervisor.sock ; (the path to the socket file)
;chmod=0700 ; sockef file mode (default 0700)
;chown=nobody:nogroup ; socket file uid:gid owner
;username=user ; (default is no username (open server))
;password=123 ; (default is no password (open server))
[inet_http_server] ; inet (TCP) server disabled by default