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
def find_root(self, node): | |
""" | |
find the node whose parent is the invisible root item | |
Parameters | |
---------- | |
node : QtGui.QTreeWidgetItem | |
The node whose top level parent you wish to find | |
Returns |
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
def foo(var1=None, var2=False, var3=None, var4=None): | |
# get the number of input arguments | |
argcount = foo.func_code.co_argcount | |
# get the names of those input arguments | |
varnames = search.func_code.co_varnames[:argcount] | |
# get the values of those input arguments | |
# ??? | |
# I can programatically do it by: | |
varvals = [var1, var2, var3, var4] | |
# and then create a dictionary by: |
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
C:\dev\my_src\python\metadataStore [master]> python .\example\sample_code_raw.py | |
Header insert time is 5.00011444092 ms | |
Descriptor insert time is 3.99994850159 ms | |
Event insert time is 11.9998455048 ms | |
Traceback (most recent call last): | |
File ".\example\sample_code_raw.py", line 32, in <module> | |
print db.header.find({'tags': {'$in': ['CSX_Experiment1']}})[0] | |
File "C:\Users\edill\AppData\Local\Continuum\Anaconda\lib\site-packages\pymong | |
o\cursor.py", line 597, in __getitem__ |
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
Traceback (most recent call last): | |
File "/home/edill/dev/python/metadataStore/example/sample_collection_code.py", line 71, in <module> | |
create_event(event) | |
File "/home/edill/dev/python/metadataStore/metadataStore/collectionapi/commands.py", line 106, in create_event | |
owner=owner, data=data) | |
File "/home/edill/dev/python/metadataStore/metadataStore/dataapi/commands.py", line 271, in insert_event | |
__validate_keys(formatted_data_keys, desc_data_keys) | |
File "/home/edill/dev/python/metadataStore/metadataStore/dataapi/commands.py", line 293, in __validate_keys | |
raise ValueError('Data keys for event data and descriptor data do not match! Check ' + str(key)) |
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__ = 'arkilic' | |
import six | |
import random | |
import time | |
from metadataStore.api.collection import (create_event, | |
create_header, | |
create_event_descriptor) | |
from metadataStore.api.collection import search_and_compose as search | |
import numpy as np |
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
"CSX-1 Scalars": | |
EpicsScaler: | |
pimte_tot1: | |
record: XF:23ID1-ES{Dif-Cam:PIMTE}Stats1:Total_RBV | |
numchan: 32 | |
EpicsSignal: | |
sclr_trig: | |
read_pv: XF:23ID1-ES{Sclr:1}.CNT | |
sclr_ch1: | |
read_pv: XF:23ID1-ES{Sclr:1}.S1 |
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
try: | |
# get the time | |
time = self.time | |
try: | |
# get the timestamp represented as datetime | |
time_as_datetime = getattr(mongo_document, 'time_as_datetime') | |
except AttributeError: | |
# convert the timestamp into a datetime object | |
time_as_datetime = datetime.datetime.fromtimestamp(time) | |
# and set the object attribute |
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
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:e2605b210ae12f03dc1edcc0d0f9ee37e92ea29878dc6281fa7f9cec614dd86c" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ |
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
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:99ca63ecc5c9fe998ed4fd04b1399099f64b62a231cec3d72c27eb8c921dc740" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ |
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
# Change Log | |
## [Unreleased](https://github.com/NSLS-II/dataportal/tree/HEAD) | |
[Full Changelog](https://github.com/NSLS-II/dataportal/compare/v0.0.5...HEAD) | |
**Closed issues:** | |
- Teach DataBroker\[key\] about uids [\#130](https://github.com/NSLS-II/dataportal/issues/130) |
OlderNewer