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
svn status -u # predict conflicts |
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
import time | |
import copy | |
import numpy | |
import logging | |
logger = logging.getLogger('iss_processor') | |
logging.basicConfig(level='DEBUG') | |
# DEFINE DATABASE |
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
conda build recipe/ python=3.6 -c anaconda | |
Glob /home/lili/dev/pygobject-feedstock/python=3.6 did not match in root_dir /home/lili/dev/pygobject-feedstock | |
ERROR:conda_build.utils:Glob /home/lili/dev/pygobject-feedstock/python=3.6 did not match in root_dir /home/lili/dev/pygobject-feedstock | |
Adding in variants from internal_defaults | |
INFO:conda_build.variants:Adding in variants from internal_defaults | |
Attempting to finalize metadata for pygobject | |
INFO:conda_build.metadata:Attempting to finalize metadata for pygobject | |
Solving environment: ...working... done |
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
[Unit] | |
Description=Apache Kafka server (broker) | |
Documentation=http://kafka.apache.org/documentation.html | |
Requires=zookeeper.service network.target remote-fs.target | |
After=zookeeper.service network.target remote-fs.target | |
[Service] | |
Type=forking | |
PIDFile=/var/run/kafka.pid | |
ExecStart=/home/user/bin/kafka start |
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
cd /opt | |
wget http://apache-mirror.rbc.ru/pub/apache/kafka/0.10.1.0/kafka_2.11-0.10.1.0.tgz | |
tar xvzf kafka_2.11-0.10.1.0.tgz | |
ln -s kafka_2.11-0.10.1.0/ kafka | |
vi /etc/systemd/system/kafka-zookeeper.service | |
[Unit] | |
Description=Apache Zookeeper server (Kafka) | |
Documentation=http://zookeeper.apache.org |
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
# 3 config server first | |
mongod —configsvr | |
# mongos, the router | |
mongos —configdb ip1:port1, ip2:port2, ip3:port3 | |
# mongod at 3 servers | |
# mongod —shardsvr | |
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
Installation: | |
# install java | |
# based on https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-get-on-debian-8 | |
sudo apt-get update | |
sudo apt-get install default-jre | |
sudo apt-get install default-jdk | |
lili@cmb01:~$ java -version |
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
import random | |
import time | |
from collections import deque | |
from threading import Thread | |
import zmq | |
import numpy as np | |
import pandas as pd |
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
docker images | |
docker run -i -t docker_name:version | |
docker run -it -name li docker_name:version # give it a name | |
# list containers | |
docker ps | |
# go back to a running image | |
docker attach name(or ID) |
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
class MyDetector(SingleTrigger, SomeHardwareThing): | |
hdf5 = Cpt(HDF5PluginWithFileStore, ....) | |
det = MyDetector('PV:..', name='det', image_name='my_image') | |
det.hdf5.read() # hdf5.read_attrs filename, capture_setting, | |
Staging: |
NewerOlder