Skip to content

Instantly share code, notes, and snippets.

Avatar

Thomas A Caswell tacaswell

  • Brookhaven National Lab
  • New York
View GitHub Profile
View squashing_hdf5
class FileStoreSquashing(FileStorePluginBase):
'''Write out 'squashed' files
.. note::
See :class:`FileStoreBase` for the rest of the required parametrs
This mixin will also configure the ``cam`` and ``proc`` plugins
on the parent.
View adcore.patch
diff --git a/ADApp/commonDriverMakefile b/ADApp/commonDriverMakefile
index 7217ad42..b5aa4ef5 100644
--- a/ADApp/commonDriverMakefile
+++ b/ADApp/commonDriverMakefile
@@ -1,7 +1,25 @@
# This file contains the commands to build driver applications using the common set of plugins
# The variable DBD_NAME should be defined to specify the name of the application DBD file.
-# For backwards compatibilty if DBD_NAME is not specified then PROD_NAME must be specified,
+# For backwards compatibilty if DBD_NAME is not specified then PROD_NAME must be specified,
# and DBD_NAME will set to this.
View v12_issues.txt
(/home/tcaswell/conda_envs/cp_test) tcaswell@xf02id1-ws1:~$ caproto-get 'SR:OPS-BI{DCCT:1}I:Real-I' -vvvv
[get] Spawned caproto-repeater process.
[get] Registering with the Channel Access repeater.
[cli.bcast] Serializing 1 commands into one datagram
[cli.bcast] 1 of 1 RepeaterRegisterRequest(client_address='0.0.0.0')
[get] Repeater registration timed out; continuing.
[get] Searching for 'SR:OPS-BI{DCCT:1}I:Real-I'....
[cli.bcast] Serializing 2 commands into one datagram
[cli.bcast] 1 of 2 VersionRequest(priority=0, version=13)
[cli.bcast] 2 of 2 SearchRequest(name=b'SR:OPS-BI{DCCT:1}I:Real-I', cid=0, version=13)
View streaming_arrow.py
import random
import time
from collections import deque
from threading import Thread
import zmq
import numpy as np
import pandas as pd
View Feather-Perf-Test.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View beamline2.py
""" Tiny example for BNL showing multi-actor control """
from dask.distributed import Client, get_client, Variable, fire_and_forget
import numpy as np
import time
import random
def get_image_from_detector():
View get_repos.py
import aiohttp
import gidgethub
import gidgethub.aiohttp
try:
with open(os.path.expanduser('~/.ghoauth'), 'r') as f:
oauth_token = f.read()
except FileNotFoundError:
oauth_token = None
@tacaswell
tacaswell / parse.py
Last active Mar 22, 2017
playing with dbd + parsimonious
View parse.py
from parsimonious.grammar import Grammar, NodeVisitor
grammar = Grammar(r"""
dbd = (comment / cimport / field / menu / record_type / variable / device / include / registrar / function / driver / "\n")+
field = _ "field(" f_name "," _ f_type ")" _ "{" (fp / "\n" )* _ "}"
f_name = ~"[A-Z0-9_]+"
f_type = "DBF_STRING" / "DBF_CHAR" / "DBF_UCHAR" / "DBF_SHORT" / "DBF_USHORT" / "DBF_LONG" / "DBF_ULONG" / "DBF_FLOAT" / "DBF_DOUBLE" / "DBF_ENUM" / "DBF_MENU" / "DBF_DEVICE" / "DBF_INLINK" / "DBF_OUTLINK" / "DBF_FWDLINK" / "DBF_NOACCESS"
fp = _ (prompt / special / size / promptgroup / g_field / comment / extra / "\n")
prompt = "prompt(" prompt_val ")\n"
View keybase.md

Keybase proof

I hereby claim:

  • I am tacaswell on github.
  • I am tacaswell (https://keybase.io/tacaswell) on keybase.
  • I have a public key whose fingerprint is AC47 F71D B275 ECD0 B3DA 46E8 57FA 4540 DD4E FCF7

To claim this, I am signing this object:

@tacaswell
tacaswell / PLOTCON
Last active Nov 17, 2016
plotcon talk
View PLOTCON
Talk preseted at PLOTCON 2016
This gist contains
- static images
- the Jupyter notebook of the talk