Skip to content

Instantly share code, notes, and snippets.

View mrakitin's full-sized avatar

Max Rakitin mrakitin

View GitHub Profile
from dask.distributed import Client, get_client, Variable, fire_and_forget
import numpy as np
import time
import random
def get_image_from_detector():
""" Collect image from detector
Actually this just produces a random image
@danielballan
danielballan / sample_example.py
Last active September 5, 2018 21:32
toy example for getting sample tracking going at CHX
# Do this part whether you acquiring data or accessing it.
import pymongo
cli = pymongo.MongoClient('xf11id-ca')
samples = cli.get_database('samples').get_collection('samples')
from databroker import Broker
db = Broker.named('temp') # for real applications, 'temp' would be 'chx'
# Do this part when you are entering new samples.
# I'm going to assume that 'name' is unique. We should be more careful about
@johnduarte
johnduarte / bluejeans_rpm_via_alien.md
Last active January 30, 2020 09:28
BlueJeans rpm install on Debian

FYI, for those of us running Debian based systems rather than RedHat, the BlueJeans RPM can be successfully installed via alien

Steps to install BlueJeans on Debian

  • Download BlueJeans RPM
  • Install alien package sudo apt-get install alien
  • Convert BlueJeans RPM to a DEB package sudo alien --to-deb --scripts bluejeans-*.rpm
  • Install resulting DEB sudo dpkg -i bluejeans_*.deb
  • Run BlueJeans with /opt/bluejeans/bluejeans-bin

You may get an error loading the expected udev library

@lttlrck
lttlrck / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote