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 | |
# -*- coding: utf-8 -*- | |
""" | |
Camlistore Flux Capacitor | |
~~~~~~~~~~~~~~~~~~~~~~~~~ | |
A GUI to travel through time in your filesystem using Camlistore. | |
:copyright: 2014 by Hernan E. Grecco. | |
:license: BSD. |
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
from __future__ import division, unicode_literals, print_function, absolute_import | |
import re | |
from collections import defaultdict | |
_NEST_SCOPES = {'[': ']', '(': ')', '{': '}'} | |
_STR_SCOPES = '"' + "'" | |
#: Regex to find function calls. |
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
SampleRateUnit = {'Seconds': '0', 'Minutes': '1', 'Hours': '2', | |
'Days': '3', '%': '4'} | |
SamplePeriodUnit = {'Seconds': '0', 'Minutes': '1', 'Hours': '2', | |
'Days': '3', 'Weeks': '4', 'Pulses': '5'} | |
TotalDurationUnit = {'Period': '0', 'Seconds': '1', 'Minutes': '2', | |
'Hours': '3', 'Days': '4', 'Weeks': '5', 'Continuous': '6', | |
'predefinded': '7'} | |
TimeStampEnabled = {False: 0, True: 1} | |
@Feat(values=(None, SampleRateUnit, None, SamplePeriodUnit, None, |
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 numpy as np | |
class C(object): | |
def __init__(self, value): | |
self.value = value | |
def __getattr__(self, name): | |
return getattr(self.value, 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
from collections import defaultdict | |
import concurrent.futures | |
class TasksGroup(object): | |
"""A group of tasks with dependencies. | |
>>> tasks = TasksGroup() | |
>>> @tasks.add() |
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
class _A33120(object): | |
"""Agilent 33120A Function/Arbitrary Waveform Generator | |
""" | |
# Here goes the code for the instrument functions that | |
# are available in *both* GPIB and RS-232 | |
class A33120Serial(_A33120, SerialDriver): | |
"""Agilent 33120A Function/Arbitrary Waveform Generator |
NewerOlder